Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Highlighted
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,

Not applicable

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

Hi tres, THANKS! LEGEND! works perfectly.

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