Skip to Content
author's profile photo Former Member
Former Member

Date And Time Formate

Hi friends,

I want to change this formate date and time 18.01.2008 16:40:31 to 01/18/2008 04:40:31PM

Could you please any one Suggest any FM for this?

Thanks & regards

HB

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 19, 2008 at 08:09 AM

    Hi,

    Change your date and time format before passing to FM..

    Using EDIT MASK 'YYYY/MM/DD' and 'HH:MM:SS'

    And then call FM..

    "CY_CONVERT_DATE" . It will convert the date into current user format.

    Regards

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 19, 2008 at 08:24 AM

    Hi Hans,

    Follow the below logic ok..

    data: lv_dat TYPE d, "For Date

    lv_date(10). "For Date

    *For Date

    SET COUNTRY 'US'.

    lv_dat = '18.01.2008'

    WRITE lv_dat TO lv_date MM/DD/YYYY.

    Reward points if helpful.

    Kiran Kumar.G.A

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 19, 2008 at 08:32 AM

    Hi,

    U can use edit mask for ur requiremnet as

    DATA date TYPE d VALUE '18.01.2008 '.

    WRITE (8) date USING EDIT MASK '_/_/_'

    Regards

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.