Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for 
Search instead for 
Did you mean: 
juan_escobar
Creator II
Creator II

Changing hour/date format

Hello, I have this Time/Date cell:

Hour.png

I want to separate the date and the hour from the cell,

how can I do that using the script?

Thank you very much

1 Solution

Accepted Solutions
Not applicable

Hi Juan,

you can do that using 3 functions: Date, Time, Floor

Date(floor(DateTimeField)) as [DateTimeField - Date],

Time(DateTimeField-floor(DateTimeField)) as [DateTimeField - Hour],

See the attached sample qvw.

Ingo.

View solution in original post

3 Replies
Not applicable

Hi Juan,

you can do that using 3 functions: Date, Time, Floor

Date(floor(DateTimeField)) as [DateTimeField - Date],

Time(DateTimeField-floor(DateTimeField)) as [DateTimeField - Hour],

See the attached sample qvw.

Ingo.

View solution in original post

Sokkorn
Master
Master

Hi Juan,

Try this simple

LOAD

DATE(DateField)    AS [Dates],

TIME(DateField)    AS [Times],

.....

FROM ....

Regards,

Sokkorn Cheav

jagan
MVP
MVP

Hi,

You can get the Date and Time in separate fields in in Load Script as suggested by Sokkorn by using DATE() and TIME() methods instead of Calculated dimension.  Calculated Dimensions leads to performance issues.

Hope this helps you.

Regards,

Jagan.