Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
JustJoshin
Contributor
Contributor

Date Variable not saving in override format

Hi,

I have a Date field in my load script coming in as:

Timestamp(left(resolutiondate, 10) & ' ' & mid(resolutiondate, 12, 7), 'MM-DD-yyyy') as [Resolved Simplified],

and I am trying to use a Calendar  button object to set start and end dates for the column using variables.

I have a variable "vResolvedStart" that has a

min: =Min({1} [Resolved Simplified])
max: =Max({1} [Resolved Simplified])

with a number  tab settings including "override document settings" and the format set to Date and format pattern "M-D-YYYY"

The issue is when I check in the Variable overview I see the definition as a number. "43770.42224537"

Am I overlooking something?

Labels (3)
4 Replies
Yousef_Amarneh
Partner - Creator III
Partner - Creator III

In Qlik the number that you see is a date but you need to format it using date function

Date(YourDateField,'MM-DD-YYYY')

Yousef Amarneh
Brett_Bleess
Former Employee
Former Employee

Josh, did Yousef's suggestion get things working as you wanted?  He is correct by the way, you need to encapsulate the expression with the date function he mentioned to see the actual date in the variable, otherwise it is likely going to be shown as you are seeing it.  If Yousef's comment worked, please be sure to use the Accept as Solution button on his post to give him credit for the help and let other Community Members know it worked too.  If you are still working on things, leave an update.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.
JustJoshin
Contributor
Contributor
Author

Would this need to be set? The Load statement? Does this need to be set elsewhere for the variable. For comparison I have a similarly setup up calendar button to variable that does not seem to be having this issue (This is a legacy QVW I am overhauling so I did not create it originally nor is that person available).


The working variables

LOAD Snippet
Timestamp(left(created_u1, 10) & ' ' & mid(created_u1, 12, 7), 'MM-DD-yyyy') as [Created Simplified],

I have a variable "vStartDate" that has a

min: =Min({1} [Created Simplified])
max: =Max({1} [Created Simplified])

with a number tab settings including "override document settings" and the format set to Date and format pattern "MM-DD-yyyy".




Brett_Bleess
Former Employee
Former Employee

Josh, best thing would be to attach the QVW or a sample that shows the issue, so folks can dig into at this point, not sure if anyone else will have anything without that.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.