Date format for US

I’ve read all the easymorph community articles on Date formats, tried many of the solutions. I’m unable to get an excel import text date ‘01/07/2022’ format is MM/dd/yyyy. To convert in easymorph as a true ‘MM/dd/yyyy’ format to then use the action “Make date/time columns” Quarter.
I’ve tried format((date([Check Date],‘MM/dd/yyyy’)),‘MM/dd/yyyy’) which results in dd/MM/yyyy

I tried formatting the date using the localtime which produced an error.

Your assistance is greatly appreciated. Thank you.

Hi Elyse,

What you get from Excel is a text date. It needs to be converted into a number date in EasyMorph. In your case, the expression to convert is below:

date([Date], 'MM/dd/yyyy')

Check out this example: date-parsing.morph (2.9 KB)

Note that EasyMorph can apply different number formatting to number dates. Like in Excel, the formatting only applies to the datagrid. It doesn’t change the data. Without formatting, a number date can look like 44568 or a similar 5-digit number.

EasyMorph also tries to auto-detect format, but sometimes it fails to do it correctly. Choose the necessary format in the column bar (can be seen in the screenshot below):

Hi Dmitry,
I tried that path with the result being 07/01/2022 - dd/MM/yyyy even though I stated to use the ‘MM/dd/yyyy’ (I suspect it’s the default in the format window)

If I select the M/d/yy in the format dropdown the leading zeros are dropped.

If I add another calculated field and use format([Check Date],‘MM/dd/yyyy’) returns an error. We have a requirement to display the date with the leading zeros for month and day. I suspect I can get away without the leading zeros for extracting the quarter. Then I assume I can use a formula to force the ‘MM/dd/yyyy’ to display before exporting.

Maybe a future enhancement to have ‘MM/dd/yyyy’ as an available format in the dropdown :slight_smile: