Is there a way convert a Datetime value to Date type in the 4GL language? I need to compare a date with a datetime variable in 4GL but it does not work. Therefore, I would need to convert the datetime to a date.
Is there a way to subtract time from datetime instead?
Hi Chris:
In the AFNC script, there are two functions that could help you. Try this in the calculator:
func AFNC.DATE_FROM_DT(datetime$) -> It will return the date from a datetime value
func AFNC.TIME_FROM_DT(datetime$) -> It will return a string value with this format: HH:MM:SS
The parameter must be a “Datetime” variable.
it's frustrating that SAGE doesn’t provide a good documentation about this libraries.
I hope it helps you.
Thanks,
Nacho.
Nacho_Alferez Your answer saved me a lot of time. It seems almost like they don't want us to write our own code ;)
*Community Hub is the new name for Sage City