csvjdbc icon indicating copy to clipboard operation
csvjdbc copied to clipboard

Add a TO_DATE(str, format) SQL function

Open simoc opened this issue 8 months ago • 0 comments

Add an SQL function to convert a string to a date/timestamp.

The java.time.format.DateTimeFormatter class will be used to convert the string and format will be a pattern used by java.time.format.DateTimeFormatter.

Also use the CsvJdbc "timeZone" and "locale" database connection properties when converting the string, if set.

For reference, similar logic already exists in the CsvJdbc function StringConverter.createFormatter().

simoc avatar Oct 20 '23 17:10 simoc