Skip to main content
Announcements
Do More with Qlik - Qlik Cloud Analytics Recap and Getting Started, June 19: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Makedate function returning strange dates...

Hello

I am working on an excel sheet with different columns for a date , ie Year, month, day.

LOAD Year,
Month,
Day,
Hour,
Celsius,
Rain_mm,
Sun_Minutes,
MakeDate (Day&Month&Year) as Date

i have been trying using MAKEDATE to generate the date but in returns...i have this...01.01.112012, 01.01.122012, etc...

what i have done wrong ?

thanks

JP

27 Replies
PrashantSangle

Hi,

If you want change the format use Date() as suggested by Swehl

like

Date(MakeDate(Year,Month,if(isnull(Day) or len(trim(Day))<1 ,'1',Day)),'DD/MMM/YYYY')

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Not applicable
Author

   

YearMonthDayHourCelsiusRain_mmSun_Minutes
20121105.600
20121115.900
20121125.800
20121135.700
20121145.400
20121155.100
20121165.500
20121175.80.10
20121186.700
20121197.60.10
201211108.500
201211119.500
2012111210.201
2012111310.400
2012111410.800
2012111510.600
201211169.500
201211178.600
201211187.900
20121119800
201211207.300
201211216.300
201211226.100
201211237.100 !
Not applicable
Author

this is Jan 1 2012 full day, information on weather forecast hour by hour...

Not applicable
Author

And need to transform this excel sheet in order to get this result :  Day Month Year 01.01.2012

PrashantSangle

Hi,

What is your expected output????

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
sasiparupudi1
Master III
Master III

LOAD *,

Date(MakeDate (Year,Month,Day),'DD.MM.YYYY') as Date

//MakeDate(Year, Month,Day)  AS Date

INLINE [

Year,Month,Day,Hour,Celsius,Rain_mm,Sun_Minutes

2012,1,1,0,5.6,0,0

2012,1,1,1,5.9,0,0

2012,1,1,2,5.8,0,0

2012,1,1,3,5.7,0,0

2012,1,1,4,5.4,0,0

2012,1,1,5,5.1,0,0

2012,1,1,6,5.5,0,0

2012,1,1,7,5.8,0.1,0

2012,1,1,8,6.7,0,0

2012,1,1,9,7.6,0.1,0

2012,1,1,10,8.5,0,0

2012,1,1,11,9.5,0,0

2012,1,1,12,10.2,0,1

2012,1,1,13,10.4,0,0

2012,1,1,14,10.8,0,0

2012,1,1,15,10.6,0,0

2012,1,1,16,9.5,0,0

2012,1,1,17,8.6,0,0

2012,1,1,18,7.9,0,0

2012,1,1,19,8,0,0

2012,1,1,20,7.3,0,0

2012,1,1,21,6.3,0,0

2012,1,1,22,6.1,0,0

2012,1,1,23,7.1,0,0

];

Not applicable
Author

One column with the date in the following format 01.01.2012 (day, month. year) and this result for each line of my weather forecast.

thanks for your support

Not applicable
Author

As already suggested, I'd use Date(MakeDate(Year, Month,Day),'DD.MM.YYYY')  AS Date.

swuehl
MVP
MVP

I understood that's what you already get?

buzzy996
Master II
Master II

try tis way,

MakeDate (Day(Day)&Month(Month)&Year(Year)) as Date --i think it makes difference.


something like tihs exactly,


Makedate(Year([Order Date]),Month([Order Date]),Day([Order Date])) as DayMonthYear,