Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
qvqfqlik
Creator
Creator

Help with date

I need to read date values from excel file which is in format of Jan 31 2017  7:00:41:000AM

I am unable to change the date format in excel, but how to read and change the date format in Qlikview ?

Please suggest all possible ways of reading and changing the format of this in Qlikview

Read just the date . timestamp is not necessary.

1 Solution

Accepted Solutions
sunny_talwar

Try this:

Table:

LOAD Date as Old_Date,

  Date(Floor(TimeStamp#(Replace(Date, '  ', ' '), 'MMM D YYYY h:mm:ss:fffTT'))) as Date

FROM

[..\..\Downloads\Dates.xlsx]

(ooxml, embedded labels, table is Sheet1);

View solution in original post

13 Replies
sunny_talwar

May be this

Date(Floor(TimeStamp#(DateField, 'MMM DD YYYY  h:mm:ss:fffTT'))) as Date

Kushal_Chawda

After loading the data from excel file in qlikview, if your Date field is in timestamp format, then just use below

date(floor(DateField)) as Date

qvqfqlik
Creator
Creator
Author

I tried both , but I couldn't values into Date1, Date2 fields

Dates:

LOAD
Date as OriginalDateformat,
Date(Floor(TimeStamp#(Date, 'MMM DD YYYY h:mm:ss:fffTT'))) as Date1,
Date(Floor(Date, 'MMM DD YYYY'))  as Date2
 
FROM

sunny_talwar

Second one would be this

Date(Floor(Date), 'MMM DD YYYY')  as Date2

qvqfqlik
Creator
Creator
Author

Sunny, it still has no data in those fields

qvqfqlik
Creator
Creator
Author

the format in excel is not a date format. I tried this as well, abut still not values in this field

Date(Left([Date], 3) & Mid([Date], 4, 2) & Right([Date], 4)) as Date3

maxgro
MVP
MVP

please post the excel with few rows

sunny_talwar

I agree with Massimo... would you be able to post a sample file to test this out?

qvqfqlik
Creator
Creator
Author

I attached excel file to the initial post