Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
akpofureenughwu
Creator III
Creator III

Date Format

I have a date field whose format is MM/DD/YYYY.

My prefered format is DD/MM/YYYY

How do I convert it to the prefered format

Regards

_________________________________________

[Inflow]:

LOAD

     [Date]as [Inflow_Date],

    [ASSET] as [Inflow_Asset],

    [CATEGORY] as [Inflow_Category],

    [YEAR]  as [Inflow_Year],

    [AMOUNT_k] as [Inflow_AMOUNT_k],

    [AMOUNT_j] as [Inflow_Amount_j]

FROM [lib://WIN-WIN/xxxxx.xlsx]

(ooxml, embedded labels, table is Inflow);

17 Replies
ahaahaaha
Partner - Master
Partner - Master

Hi,

try

Date(Date#(FieldDate, 'MM/DD/YYYY'), 'DD/MM/YYYY')

Regards,

Andrey

rahulpawarb
Specialist III
Specialist III

Hello Akpofure,

Please refer below given sample expression:

//Date# function will interpret [Date] field in 'MM/DD/YYYY' format and

//Date function will convert it into 'DD/MM/YYYY' format

Date(Date#([Date], 'MM/DD/YYYY'), 'DD/MM/YYYY') AS [Inflow_Date]

Hope this will be helpful.

Regards!

Rahul

sunny_talwar

Read more on this topic here:

Get the Dates Right

Why don’t my dates work?

akpofureenughwu
Creator III
Creator III
Author

Thanks you Rahul and Andrey... I actually did that.. but I'm getting a blank screen on my froint end.. See attached

sunny_talwar

Can you create Date without any manipulation and share a screenshot to show its format? I have a feeling that it might not be MM/DD/YYYY

akpofureenughwu
Creator III
Creator III
Author

Here is the screenshot of the date without manipulation..

MM/DD/YYYY

sunny_talwar

I don't see any screenshot

akpofureenughwu
Creator III
Creator III
Author

oops

Here it is

sunny_talwar

May be add Trim function to make sure that there are not extra spaces

Date(Date#(Trim(FieldDate), 'MM/DD/YYYY'), 'DD/MM/YYYY')