In the following expression
"DATETIME"::date || ' 23:59:59.000'
I’m converting a DATETIME field to a pure date. The string concatenation changes the value to the very end of the day. I would now like to insert this value back into another DATETIME field but I am unsure how to convert from text back to DATETIME
This expression should work.
Depending on your application, you might need to consider leap seconds. The 59th second isn’t invariably the last second before the next date.