Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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
MVP
MVP

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

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,

3 Replies
MVP
MVP

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

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,

Highlighted
Not applicable

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

Hi tres, THANKS! LEGEND! works perfectly.

MVP
MVP

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

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

Community Browser