Qlik Community

Ask a Question

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Do More with Qlik - for Beginners and Beyond, Topic: Qlik Replicate on January 21, 2PM EST. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Convert months and days into date

Hi guys,

i have 4 fields: minDay, minMonth, maxDay, maxMonth

i need to convert them into 2 fields: minDate and maxDate; so i have to join month and day in one field without the year.

I have already tried MAKEDATE but it also inserts the year (not correct!)

Can anyone help me?

Thanks,


Federica

5 Replies
Master III
Master III

Hi Federica,

which are the formats of Dates ?

Not applicable

‌Numbers

Well a date value always needs a year. But you could create a custom field like

=Date(Date#(minMonth & '-' & minDay, 'MM-DD'), 'DD-MM')

(if month is a number)

=Date(Date#(minMonth & '-' & minDay, 'MMM-DD'), 'DD-MM')

(if month is a month name abbreviation)

=Date(Date#(minMonth & '-' & minDay, 'MMMM-DD'), 'DD-MM')

(if month is a full month name)

Set the output format by replacing the last 'DD-MM' in the expression with your desired format.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Master III
Master III

And the format of Min/MaxDate ? DDMM ?

Try like this

Date(MakeDate(2017,vMonth,vDay),'DDMM')

Contributor
Contributor

ok, useful, thanks