How to turn a stored value into date value?

Platform: ubuntu 6.04.

How to turn a stored value of “2019-12-02” back into date data and extract part of it like “12-02” instead of dumping value like 24770986 ? thanks

Do you mean like this?

string = "2019-12-02";
Dump( string.ParseDateTime().DateFormat( "mm-dd" ) );//12-02
1 Like

Great idea. However, for some reason, ParseDateTime function is not performing, neither does LSparsedatetime. Any further thoughts?

You have an error message?

You could use dateformat("2019-12-02", "YYYY-mm")

1 Like

Good thought, but the “YYYY/mm” mask is now translated the store value
into 69720/08

Hey @justaguy. I guess what is confusing everyone about this question is the data. Where are you pulling the stored data of 24770986 and how does it represent “2019-12-02”? From what I can tell, it is too short to be EPOCH time or any other format I’m familiar with.

Look forward to helping you out!

1 Like

@wwilliams, a simple text file stored on the above platform, the text file contains entries like “2019-12-02” (without quotes). The intention was to use it as a date field data. If it’s too difficult to convert it into date data I’ll change data input value into something like {ts ‘2019-12-02 16:54:53’}
Thanks.

Cool, I was confused by the 24770986 text. Have you tried CreateODBCDate() ? Should work perfectly!