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: 
tmumaw
Specialist II
Specialist II

Evaluating Date

Good morning everyone,

Easy question for you.  I'm trying to evaluate a date field and it's retuning 1899-12-30.  Any ideas what I might be doing wrong?  Here is my statement.   The source of the date is an excel file.  The contents are:

 

Profit Center  Customer  Date (format)

123456                99999999        1/17/2018

date(evaluate(Periods), 'YYYY-MM-DD') as [Billing Date],

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar

May be try this instead

Date(Periods, 'YYYY-MM-DD') as [Billing Date]

or this

Date(Date#(Periods, 'M/D/YYYY'), 'YYYY-MM-DD') as [Billing Date]

 

View solution in original post

3 Replies
sunny_talwar

May be try this instead

Date(Periods, 'YYYY-MM-DD') as [Billing Date]

or this

Date(Date#(Periods, 'M/D/YYYY'), 'YYYY-MM-DD') as [Billing Date]

 

volakakis
Contributor II
Contributor II

evaluate(Periods) will actually do this division: 1/17/2018 = 0.000029....

Date(0.000029) = 1899-12-30

Try the other way around evaluate(date(Fieldname)) not that I understand why you want to use the evaluate funtion

Nikos
tmumaw
Specialist II
Specialist II
Author

Thanks Sunny that worked perfect.  What's strange I use the same logic with another file and it works fine......