Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Become an analytics expert with Qlik's new 15 week course: Applied Data Analytics using Qlik Sense. READ MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
cocalero
Creator
Creator

Create a Date into the script

Hello,

I would like to create a date because i only have the YEAR on my field and i would set the date 01/01/YEAR for example, and convert to integer this date into my field AsOf.

The Script:

Capture.PNG

The AsOf field:

Capture.PNG

How can i do that please ?

Thanks you in advance for your help.

Sébastien.

1 Solution

Accepted Solutions
ciaran_mcgowan
Partner
Partner

MakeDate(YEAR,1,1) AS AsOf_Date

To make it a number:

Num(MakeDate(YEAR,1,1)) AS AsOf_Date

View solution in original post

3 Replies
ciaran_mcgowan
Partner
Partner

MakeDate(YEAR,1,1) AS AsOf_Date

To make it a number:

Num(MakeDate(YEAR,1,1)) AS AsOf_Date

View solution in original post

arulsettu
Master III
Master III

try like this

date(YEAR) as AsOf

you will get date field

then you can derive year from that

year(AsOf) as year

cocalero
Creator
Creator
Author

Thanks a lot it works perfectly !