Getting Timestamp with miliseconds (format YYYY-MM-DD-HH.MM.SS.TTTTTT)

HolderAndrew

Well Known Member
Hi all,

we are converting some old iseries RPG code into E1 UBE and we have an issue in getting the timestamp correctly formatted. We need to get the timestamp in the format YYYY-MM-DD-HH.MM.SS.TTTTTTT such as 2018-08-08-15.15.41.435000

In RPG terms the timestamp is retrieved simply using the TIME function but do we have something similar in JDE?

We can format the date and time (YYYY-MM-DD-HH.MM.SS) quite easily but how do we get the TTTTTT (miliseconds?)

Reason we would like the miliseconds is because the interfaces we have may write many lines within same second and so we need to use a more accurate audit timestamp.

Best regards

Andrew
 
I have not done it myself so I don't know if it works but you can try a C BSFN that calls jdeGetTimeAndMS.
 
Hello Andrew,
Have a look at this api jdeGetDateTimeAndMilliSecCouter(&jdToday, &time, &milliSec, &counter) it is being used in B9312.c
 
Back
Top