How is it possible to format a "DateTime" data type to include milliseconds?
DR8.0 Custom mask is [SIZE=3][B][COLOR=#ff0000]HH':'mm':'ss[/COLOR][/B][/SIZE]
Adding the normal .fff after the ss does not compute.
/MM
Printable View
How is it possible to format a "DateTime" data type to include milliseconds?
DR8.0 Custom mask is [SIZE=3][B][COLOR=#ff0000]HH':'mm':'ss[/COLOR][/B][/SIZE]
Adding the normal .fff after the ss does not compute.
/MM
This might get you started:
[code]
// This function will return the date & time for use in making a unique file name - milliseconds added GM 20190920
Function TmpFileDateTimeMilliforName Returns String
String sHr sMin sSec sDate sReturn sMilli
DateTime dtNow
Move (CurrentDateTime()) to dtNow
Move (DateGetHour(dtNow)) to sHr
Move (DateGetMinute(dtNow)) to sMin
Move (DateGetSecond(dtNow)) to sSec
Move (DateGetMillisecond(dtNow)) to sMilli
If ((Length(sHr)) = 1) Move (SFormat("%1%2", "0", sHr)) to sHr // make sure leading 0 is there
If ((Length(sMin)) = 1) Move (SFormat("%1%2", "0", sMin)) to sMin // make sure leading 0 is there
If ((Length(sSec)) = 1) Move (SFormat("%1%2", "0", sSec)) to sSec
Move (Left(sMilli,2)) to sMilli
Get TmpFileDateforName to sDate
Move (SFormat("%1%2%3%4%5", sDate, sHr, sMin, sSec, sMilli)) to sReturn
Function_Return sReturn
End_Function
[/code]
Not in Dataflex Reports it won't :-)
Don't want to send the date in the RDS as a a string, because that promptly breaks the sort order... (and yes, I know I could add another column and do both, but why?)
Guess I should read which forum it's in, eh? Sorry.
Michael,
Currently there is no support for milliseconds. Will log your request.
Ugh.
I guess we'll just have to add a second column with the formatted date.