Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

calculate time in days

0 Kudos

Dear all.

I need a function that calculates the time from microsecunds in days (Data type MEINS).

Best Regards,

Thanks In advanced.

Nada

9 REPLIES 9

vinod_gunaware2
Active Contributor
0 Kudos

<b>COPF_DETERMINE_DURATION</b> – Calculates difference between date and time

<b>SD_DATETIME_DIFFERENCE</b> – Difference in days and time for two dates . .

<b>SWI_DURATION_DETERMINE</b> – The time between two events in seconds .

regards

vinod

Former Member
0 Kudos

I don't think there is built in function for the same, you will have to build one. Not to the extent of Micro seconds that you are looking for.

Regards,

Ravi

Message was edited by: Ravikumar Allampallam

0 Kudos

Hi,

days = v_ms / 86400000

Andreas

Former Member
0 Kudos

Hi Moalla!

Check out this link :

http://www.sapdevelopment.co.uk/tips/date/datehome.htm

Regards

Praneeth

Reward points if helpful !

Former Member
0 Kudos

Hi !

You need to translate your microseconds into the Timestamp format.

Then you can use the:

CONVERT TIME STAMP tst TIME ZONE tz INTO DATE d TIME t.

Command.

Regards

Rainer

Some points would be nice of that helped a bit...

0 Kudos

Thanks a lot for the answers!

actually what I have is 2 time stamps and I need to calculate the diffrence in days (data type MEINS)

Thanks!

0 Kudos

Hi Again!

In that case you can try this (diff between two time stamps) FM /SDF/CMO_DATETIME_DIFFERENCE

Regards

Praneeth

0 Kudos

Thanks a lot!

I will try it out.

0 Kudos

Hi Praneeth,

thanks!

in which system can I find the funtion module?

Regards,

Nada