On Mon, May 18, 2015 at 07:17:28AM -0400, Anthony Damico wrote:
hi, i have a VARCHAR column with dates like
"1/1/2014"
Anthony
We have the following date/string conversion functions
create function str_to_date(s string, format string) returns date external name mtime."str_to_date";
create function date_to_str(d date, format string) returns string external name mtime."date_to_str";
create function "convert"(s string, format string) returns date external name mtime."str_to_date";
Its based on the unix strftime/strptime (so for the format look at those).
Niels
and also
"12/31/2014"
since there are no leading zeroes, the months and days are in different positions so i cannot use something like this to CAST it into a date type.
CAST( SUBSTRING( x , 7 , 10 ) || '-' || SUBSTRING( x , 1 , 2 ) || '-' | | SUBSTRING( x , 4 , 5 ) AS DATE ) AS y
could someone offer advice to convert this string field to date in monetdb? thanks!!
users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list