
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Issue with MakeDate function
Hi All,
I am using MakeDate() function as present in the below script:
Tab1:
LOAD *,
Second(Time) as TimeSec,
Minute(Time) as TimeMin,
Hour(Time) as TimeHour,
date(MakeDate(Day,Month,Year),'DD-MM-YYYY') as MakeDateTemp,
LOAD * INLINE [
ID, Time, Date, Day, Month, Year
1, 09:45, 19-03-2016, 20, 05, 1990
2, 12:32:50, 10-05-2016, 10, 10, 2000
3, 04:55:55, 04-04-2015, 20, 12, 2012
4, 01:23:45, 22-09-2015, 15, 05, 2013
5, 06:07:32, 26-05-2015, 21, 01, 1995
6, 05:04:56, 24-07-2015, 30, 08, 2015
7, 03:45:55, 09-10-2015, 27, 09, 2014
8, 10:10:10, 04-08-2015, 23, 03, 2003
9, 18:32:45, 05-05-2015, 10, 05, 2015
10, 10:09:55, 10-10-2016, 19, 03, 2015
11, 0.555555, 20-10-2015, 12, 12, 2000
12, 7.45, 13-3-2015, 26, 10, 2005
13, 13:14:15, 01-01-2016, 24, 09, 2004
14, 10:10:10, 01-01-2015, 23, 12, 2013
15, 09:07:45, 12/10/2015 29, 10, 2000
];
After running the script, MakeDatetemp field returns null values.
Could anyone please explain me as to what is wrong in my code?
Thanks,
Asma
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The right format is like this
date(MakeDate(Year,Month,Day),'DD-MM-YYYY') as MakeDateTemp,
MAKEDATE() will take parameters in particular order ...i.e. Year,Month and Day

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Makedate function returning strange dates... | Qlik Community
it is useful to you


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The order of the makedate is wrong - it needs to be: makedate(year, month, day).
- Marcus


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The Makedate parameters are
MakeDate(Year, Month, Day) and not MakeDate(Day, Month, Year)


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The right format is like this
date(MakeDate(Year,Month,Day),'DD-MM-YYYY') as MakeDateTemp,
MAKEDATE() will take parameters in particular order ...i.e. Year,Month and Day

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
LOAD *,
Second(Time) as TimeSec,
Minute(Time) as TimeMin,
Hour(Time) as TimeHour,
date(MakeDate(Year, Month, Day),'DD-MM-YYYY') as MakeDateTemp
INLINE [
ID, Time, Date, Day, Month, Year
1, 09:45, 19-03-2016, 20, 05, 1990
2, 12:32:50, 10-05-2016, 10, 10, 2000
3, 04:55:55, 04-04-2015, 20, 12, 2012
4, 01:23:45, 22-09-2015, 15, 05, 2013
5, 06:07:32, 26-05-2015, 21, 01, 1995
6, 05:04:56, 24-07-2015, 30, 08, 2015
7, 03:45:55, 09-10-2015, 27, 09, 2014
8, 10:10:10, 04-08-2015, 23, 03, 2003
9, 18:32:45, 05-05-2015, 10, 05, 2015
10, 10:09:55, 10-10-2016, 19, 03, 2015
11, 0.555555, 20-10-2015, 12, 12, 2000
12, 7.45, 13-3-2015, 26, 10, 2005
13, 13:14:15, 01-01-2016, 24, 09, 2004
14, 10:10:10, 01-01-2015, 23, 12, 2013
15, 09:07:45, 12/10/2015 29, 10, 2000
];
Use this statement:
date(MakeDate(Year, Month, Day),'DD-MM-YYYY') as MakeDateTemp

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
use this (Change order of fields)
makedate(year,month,day)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks a lot everyone for the quick response...
