Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem Converting Timestamp --> Time & Date (Seperate Columns)

Hi folks,

Issue at hand, please have a look at the images below.

TimeStampProb1.jpg

In the script, the code used to make the split were:

time(frac(d_create_time),'hh:mm:ss') as Time_MT,

date(frac(d_create_time),'YYYY-MM-DD') as Date_MT,

When trying to split the column into two, the date values go haywire and its all consistent throughout the whole field showing a the value = "1899-12-30". Please advise. Thanks.

Best Regards,

R

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Try the date part like:

date(floor(d_create_time),'YYYY-MM-DD') as Date_MT,

Or simply:

date(d_create_time,'YYYY-MM-DD') as Date_MT,

View solution in original post

3 Replies
tresesco
MVP
MVP

Try the date part like:

date(floor(d_create_time),'YYYY-MM-DD') as Date_MT,

Or simply:

date(d_create_time,'YYYY-MM-DD') as Date_MT,

Not applicable
Author

Hi tres, THANKS! LEGEND! works perfectly.

MK_QSL
MVP
MVP

Try below in your script...

Date(Floor(Timestamp#(d_update_time,'YYYY-MM-DD hh:mm:ss'))) as Date,

Time(Timestamp#('2014-01-05 17:58:35','YYYY-MM-DD hh:mm:ss'),'hh:mm:ss') as Time