0 - 6 of 6 tags for date conversion

hi,
executing
SEL CAST (CAST ((CASE WHEN ( TRIM(date123) = '' ) THEN NULL ELSE (TRIM(date123)) END) AS CHAR(10) ) AS DATE FORMAT 'MM/DD/YYYY') from database.table gives the error.
 
SELECT Failed. 2665:  Invalid date.
 
quering the table for the col gives the result
 
sel date123 from database.table

Hi,
Can someone help me in achieving the below format - converting from string to date..?
Existing data - AUGUST 2012 - Its a varchar
Desired data - 2012/07 - It should be date.
Thanks,
Chanukya.

I see that my column is in the date format 'yyyy-mm-dd'. Would it affect processing speed if I were to compare this column with another column or parameter in the format CYYMMDD?

I have a character column which stores date ,as in, 20120310(yyyymmdd) format. There is requirement of dispalying this as 10-Mar-2012.

How can this conversion be made?

 

Thanks,

Kishore

Hi,

 

I just needed to get the difference between 2 Timestamps in minutes and couldn't find any useful way on the net, so I decided to add my own solution here, in case someone else needs something similar.

 

Hallo everyone

I have a record that has the date field defined as integer and the data in the field is like this

1870101

This equals 19870101, but when I try to cast it as an date value by the below way,