Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

How to make my month = 1 ?

Hi All

My excel CSV file date format as below :-
[AR Invoice Date] field :-
1/10/2020

( actual date for above is 10 Jan 2020)

Myload script as below :-
Date([AR Invoice Date], 'DD/MM/YYYY') as [date],

I get the Month = 10 , How to modify the above script , so that month = 1 ?

Paul Yep

 

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Try like:

Date(Date#([AR Invoice Date],'M/D/YYYY'), 'DD/MM/YYYY') as [date],

View solution in original post

4 Replies
tresesco
MVP
MVP

Try like:

Date(Date#([AR Invoice Date],'M/D/YYYY'), 'DD/MM/YYYY') as [date],

Vegar
MVP
MVP

Date(date#([AR Invoice Date],'M/DD/YYYY'), 'DD/MM/YYYY') as [date],

Vegar
MVP
MVP

It looks like I and @tresesco have you the same solution. The only difference is the 'M/DD/YYYY' AND 'M/D/YYYY'.

If first nine days got two digits like 01, 02,...,09 then use DD if one digit like 1, 2, ...., 9 then use D.

paulyeo11
Master
Master
Author

Hi Vegar

Thank you for sharing , now you improve a lot.