Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to make date?

Hello all

Im new in QV.

well i have 2 fields like this.

month:

1, 2, 3, 4, 5, 6, 7,...

year:

1, 2, 3, 4, 5, 6, 7, 8...

i have to make them date.

year 1 is mean 2001, 2 = 2002...

how should i do this. please anyone help me.

1 Solution

Accepted Solutions
prieper
Master II
Master II

MAKEDATE(YourYear + 2000, YourMonth) should deliver the 1st of each month.

HTH
Peter

View solution in original post

3 Replies
prieper
Master II
Master II

MAKEDATE(YourYear + 2000, YourMonth) should deliver the 1st of each month.

HTH
Peter

Not applicable
Author

hello peter

well i tried makedate() but its give me 3/1/2001 something like that so thought its not working well.

i figure it out. that date format isnt right. so i used

date(makedate(year+2000,month), 'YYYYMMDD');

now its look like give me correct date format.

sorry for typed newbie question.

Thank you peter

prieper
Master II
Master II

The MAKEDATE should already deliver you a date in the format as in the initial lines of the script under

SET DateFormat = ....

If you wish to change all your date-display as YYYYMMDD, you should be able to write this into the above statement.

HTH
Peter