Reputation: 6487
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?
Upvotes: 4
Views: 3836
Reputation: 24372
CAST (string_value AS TIMESTAMP)
For example:
CAST ('2012-09-20 21:30:15.786' AS TIMESTAMP)
Upvotes: 8