Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
cristineg
Contributor
Contributor

Multiple date formats

Just wondering if there is any script that will help me distinguish European date format ddmmyyyy from US date format mmddyyyy? I have an excel document with a date column that contains the two formats(the column itself is formatted as general). Instead of changing excel, is there qlikview script that would allow me to create a new field containing a single format? Thanks.

 
Labels (1)
  • Other

1 Reply
marcus_sommer

You could just list all date-versions and the first valid numeric interpretation is taken, for example:

alt(date(date#(DATE, 'US-Format')), date(date#(DATE, 'EU-Format')), 'no valid date') as DATE

- Marcus