txtDate := '2021-02-16T09:26:36.953'; txtNewDate := CopyStr(txtDate, 1, 4) + '-' + CopyStr(txtDate, 6, 2) + '-' + CopyStr(txtDate, 9, 2) + ' ' + CopyStr(txtDate, 12, 2) + ':' + CopyStr(txtDate, 15, 2) + ':' + CopyStr(txtDate, 18, 2); Evaluate(formatDate, txtNewDate); Data.DateMov := formatDate;
Answers
or
NewDateTime := ROUNDDATETIME(Datetime [, Precision][, Direction])
or
*this one below is to just get the date from the value you indicated
Date := DT2DATE(Datetime)
not sure what you are trying to do or evaluate it to...
I tried the above but it is not accurate since when converting this date "2021-02-16T09: 26: 36.953" the method returns this "02/16/2021 03:26 AM". Is there a way to segment the text to get the precise time?
I tried your suggestion, however the method does not return the precise time. I got this value: "02/16/2021 03:26 am"
Is there any other method to convert from this value "2021-02-16T09: 26: 36.953" to this value "02/16/2021 09:26:36 a. m.", since the first value is text format?
Thank you for your answers