Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HsqlDB 1.8 Date Functions

I am using HsqlDB 1.8 and cannot upgrade to 2.0 for some reasons. Now I need to insert a record including a TimeStamp field, but I cannot find any functions to convert a string to TimeStamp Perhaps it is easy with HsqlDB 2.0, but how can I do with 1.8?

like image 818
chance Avatar asked Feb 22 '23 09:02

chance


1 Answers

CAST (string_value AS TIMESTAMP)

For example:

CAST ('2012-09-20 21:30:15.786' AS TIMESTAMP)
like image 50
fredt Avatar answered Mar 07 '23 16:03

fredt