Jump to content

help concatenating date fields into real date field


cgchris99

Recommended Posts

concat ?

 

P.

 

concat(year,\'-\',month,\'-\',dayofmonth);

 

You can rewrite the long format to numeric format using the case:

(CASE month

WHEN \'January\'

THEN 1

WHEN \'February\'

THEN 2

....

THEN 12

END) as month_numeric;

 

So you\'ll end up with:

 

concat(year,\'-\',

(CASE month

WHEN \'January\'

THEN 1

WHEN \'February\'

THEN 2

....

THEN 12

END),\'-\',

dayofmonth);

 

P.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.