2009 Feb 07 6:15 AM
Is it possible to convert time to date and vice versa. if yes how??
2009 Feb 07 6:30 AM
what time do u need to convert.
see if this fm helps u
ADDR_CONVERT_TIMESTAMP_TO_DATE.
кu03B1ятu03B9к
what time do u need to convert.
see if this fm helps u
ADDR_CONVERT_TIMESTAMP_TO_DATE.
кu03B1ятu03B9к
2009 Feb 07 6:17 AM
2009 Feb 07 6:30 AM
what time do u need to convert.
see if this fm helps u
ADDR_CONVERT_TIMESTAMP_TO_DATE.
кu03B1ятu03B9к
2009 Feb 07 6:36 AM
Hi,
Plese refer this link.It may be usefull to u...
http://help.sap.com/abapdocu/en/ABAPCONVERT_TIME-STAMP.htm
Regards
Kiran
Edited by: Kiran Saka on Feb 7, 2009 7:41 AM
2009 Feb 07 6:39 AM
Hi Nilesh ,
U cant convert time to date .
example: 12:00 am comes every day. but the data 12 feb2009 will not.but there is a facility to convert timestamp to date .
Can you please let me know the business scenario u required this??
Thank you,
Neelima.
2009 Feb 07 8:21 AM
hi,
Its not possible to have conversions between time and date fields, because both are incompatible fields.
This can be known with respect to the inbuilt lengths of fields.
Time internally stored as HHMMSS of length fixed 6.
Date internally stored as YYYYMMDD of length fixed 8.
Thanks
Sharath
2009 Feb 07 9:34 AM
Hi,
Yes we can convert time to date....
the following code is :
data :
w_date like sy-datum,
w_int type i,
w_time like sy-uzeit.
w_time = sy-uzeit.
w_int = w_time.
move w_int to w_date.
write : w_date.
though it may not be the date you want to see... but still you can get the date.
and then you can do any kind of manipulations with that date.
Regards,
Ravi
2009 Feb 09 3:55 AM
Hi,
It is not possible to convert date into time because
Internam format of date is YYYYMMDD which has fixed length 8.
Time is HHMMSS which has fixed length 6.
Regards,
Rajani
2009 Feb 09 6:26 AM
2009 Feb 09 6:53 AM
2009 Feb 09 6:57 AM
Hi Sam,
This link has already been provided by kiran above, so was there any need for u to post it again?
кu03B1ятu03B9к
2009 Feb 09 8:52 AM
Hi Nilesh ,
Though taking type as 'T' or 'D' you cannnot convert time and date but you can take a type say 'C' or 'I' or any other type and then do it like T - C - D something like that .
Hope it helps!
Much Regards,
Amuktha .
2009 Feb 09 9:31 AM
Hi,
Check this links to get more about date conversion.
http://www.sap-basis-abap.com/sapab015.htm
Hope it will help you.
Regards:
Alok
Edited by: Alok Bansal on Feb 9, 2009 10:32 AM
2009 Feb 09 2:26 PM
Hi,
Just try this function module.
DATE_TIME_CONVERT
This gives Time (seconds since reference date)
Or else you can use these function modules:
PK_DATE_TIME_INTO_TIMESTAMP -- Converts the date and time into TimeStamp.
PK_TIMESTAMP_INTO_DATE_TIME --- Converts Time Stamp into date and time.
Thanks,
Shiny
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |