Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Make Date

Hi,

I am trying to use Make Date function by Data as :

10042014,11042014,12042014,13042014,150402014,16042014.

Using Script as :

Date:

LOAD

Date( Makedate( Left([Order Date],2), Mid([Order Date],2,4) , Right([Order Date],4)) , 'DD-MM-YYYY') as Date1,

[Order Date]

FROM

And while creating a table its giving the same values.

Thanks

Ankit

1 Solution

Accepted Solutions
maxgro
MVP
MVP

replace your script

Date:

LOAD

Date( Makedate( Left([Order Date],2), Mid([Order Date],2,4) , Right([Order Date],4)) , 'DD-MM-YYYY') as Date1,

[Order Date]

FROM

with

Date:

LOAD

Date(Makedate( Right([Order Date],4), Mid([Order Date],3,2) , Left([Order Date],2)) , 'DD-MM-YYYY') as Date1,

[Order Date]

FROM


from online help

MakeDate(YYYY [ , MM [ , DD ] ] )

Returns a date calculated from the year YYYY, the month MM and the day DD.

If no month is stated, 1(January) is assumed.

If no day is stated, 1 (the 1:st) is assumed.

Examples:

makedate(1999) returns 1999-01-01

makedate(99) returns 0099-01-01

makedate(1992,12) returns 1992-12-01

makedate(1999,2,14) returns 1999-02-14

View solution in original post

11 Replies
MK_QSL
MVP
MVP

Load Date(Date#(Date, 'DDMMYYYY'),'DD-MM-YYYY') as Date Inline

[

  Date

  10042014

  11042014

  12042014

  13042014

  15042014

  16042014

];

Update : You can create date as below in UI side...

Date(Date#(Date, 'DDMMYYYY'),'DD-MM-YYYY')

alexandros17
Partner - Champion III
Partner - Champion III

wHEN YOU USE MAKEDATE you must specify always YYYY, MM, DD, then you may convert in other formats :

Makedate( Right([Order Date],4), Mid([Order Date],2,4), Left([Order Date],2) )

yduval75
Partner - Creator III
Partner - Creator III

You have to use Date# function to convert text in Date like this :

Date(Date#([Order Date], 'DDMMYYYY'), 'DD-MM-YYYY')

manideep78
Partner - Specialist
Partner - Specialist

Try this instead of above

Date(Date#(Date,'DDMMYYYY'),'DD-MM-YYYY') as Date1

Hope this helps.

Regards

Manideep

Anonymous
Not applicable
Author

Hope this will help.

=Date( Makedate( (Right([OrderDate],4)),(Mid([OrderDate],3,2)),(Left([OrderDate],2))) , 'DD-MM-YYYY')

maxgro
MVP
MVP

replace your script

Date:

LOAD

Date( Makedate( Left([Order Date],2), Mid([Order Date],2,4) , Right([Order Date],4)) , 'DD-MM-YYYY') as Date1,

[Order Date]

FROM

with

Date:

LOAD

Date(Makedate( Right([Order Date],4), Mid([Order Date],3,2) , Left([Order Date],2)) , 'DD-MM-YYYY') as Date1,

[Order Date]

FROM


from online help

MakeDate(YYYY [ , MM [ , DD ] ] )

Returns a date calculated from the year YYYY, the month MM and the day DD.

If no month is stated, 1(January) is assumed.

If no day is stated, 1 (the 1:st) is assumed.

Examples:

makedate(1999) returns 1999-01-01

makedate(99) returns 0099-01-01

makedate(1992,12) returns 1992-12-01

makedate(1999,2,14) returns 1999-02-14

rustyfishbones
Master II
Master II

There is no need to use MakeDate function for this

Date(Date#(Date,'DDMMYYYY'),'DD-MM-YYYY') as MyNewDate


Regards

Not applicable
Author

Thanks a Lot.

It worked.

MK_QSL
MVP
MVP

Glad that you have got your desired solution.

Have you tried my solution?