Formatting date point to include time
Posted: 14 Jun 2015 05:58
Hi,
I've looked for this in the help but just can't find it...
I'm trying to format the result from LastUpdated (a datepoint) to include the time. I then store this information in my external DB.
I tried using:
dpLastUpdated = fhCallBuiltInFunction('LastUpdated', pi)
LastUpdated = string.format('%d %b %y %H:%S', dpLastUpdated)
But that doesn't work. I got the message: bad argument #2 to 'format' (number expected, got userdata). So I guess string.format doesn't understand datepoints.
I appreciate your help with this.
Shosh
I've looked for this in the help but just can't find it...
I'm trying to format the result from LastUpdated (a datepoint) to include the time. I then store this information in my external DB.
I tried using:
dpLastUpdated = fhCallBuiltInFunction('LastUpdated', pi)
LastUpdated = string.format('%d %b %y %H:%S', dpLastUpdated)
But that doesn't work. I got the message: bad argument #2 to 'format' (number expected, got userdata). So I guess string.format doesn't understand datepoints.
I appreciate your help with this.
Shosh