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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
evansabres
Specialist
Specialist

Date in Script

Date(Interval(nwEVENTDTE - 56, 'd'),'mm/dd/yyyy')AS

EightWeeks

A line in my script appears as above. However, when I load the script and view the data, the field displays as 00/03/2016, which should be 11/03/2016.

Am I formatting this incorrectly in the script?

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Format code for month is MM, not mm (which denotes minutes):

'MM/DD/YYYY'

View solution in original post

2 Replies
swuehl
MVP
MVP

Format code for month is MM, not mm (which denotes minutes):

'MM/DD/YYYY'

swuehl
MVP
MVP

Besides this, no need to format the inner calculation:

Date(nwEVENTDTE - 56,'MM/DD/YYYY') AS EightWeeks