Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
pauldamen
Partner - Creator II
Partner - Creator II

Make date string into date

Hi,

I have an excel file with the following date column: 2/28/2016 4:15:28 pm.

How can I make a regular date from this in Qlikview (2-28-2016), I tried all functions like Date# and num# but it just won't recognize it as a date.

Any suggestions?

Regards, Paul

1 Solution

Accepted Solutions
sunny_talwar

May be this:

Date(Floor(Date#(DateField, 'M/D/YYYY h:mm:ss TT')), 'M-D-YYYY') as DateField

or this if it is already recognized as timestamp

Date(Floor(DateField), 'M-D-YYYY') as DateField

View solution in original post

4 Replies
sunny_talwar

May be this:

Date(Floor(Date#(DateField, 'M/D/YYYY h:mm:ss TT')), 'M-D-YYYY') as DateField

or this if it is already recognized as timestamp

Date(Floor(DateField), 'M-D-YYYY') as DateField

Chanty4u
MVP
MVP

load *,

Date(Date#(Field,'2/28/2016 4:15:28 pm'),' D-MM-YYYY')  as NewDate;

Anonymous
Not applicable

may be something like this?

Date(Date#(DateField,'YouExcelDateFormat'),'NewDateFormat') as NewDate

Chanty4u
MVP
MVP

or

load *,

Date(Date#(Field,D/MM/YYYY h:mm:ss TT''),' D-MM-YYYY')  as NewDate;

or

TimeStamp(Timestamp#(Field,D/MM/YYYY h:mm:ss TT''),' D-MM-YYYY')  as NewDate;