Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
This is about quite a specific file. In the QVW attached, there are two calendar objects that use two different variables. One is vStart and the other is vEnd. Both variables are set on document load, one to 6 days ago and one to one day ago (yesterday). Both calendar objects have identical min and max values:
=date('01/01/2000','DD/MM/YYYY') and =date('31/12/2070','DD/MM/YYYY')
So far so good, the page loads, the date objects both display valid dates I.E. 24/05/2014 and 29/05/2014.
But they work differently in terms of functionality. The first, for vStart, returns a date as expected, in the format DD/MM/YYYY. The second, however, returns a number, presumably a timestamp(?) I want the second calendar object to return a date just like the first, can anybody tell me why it isn't?
Not sure why you need it, changing Number format to Date in the calendars should be enough. But if you wish so:
Create input box, and add your variables there. Go to the number tab of the input box. Make sure your variables are in Date format.
The vEnd variable is in integer format.
No need to change, just use "Date" format in the calendars object properties.
Where can I find that option? How is the vEnd variable defined differently from the vStart and how can you tell? Thanks.
It is on the Number tab of the object properties. Check Override Document Settings, and then "Date" radio-button.
Thanks that worked!
I'm still a little confused as to why they work differently though?
Where can I tell what type of variable it is?
Actually that didn't work, sorry. The value of the calendar object textbox is in a DD/MM/YYYY format, but the variable is still being set as a timestamp. How can I change the variable type?
Not sure why you need it, changing Number format to Date in the calendars should be enough. But if you wish so:
Create input box, and add your variables there. Go to the number tab of the input box. Make sure your variables are in Date format.
Hi,
Perhaps you can use the function Date() like in SQL:
Date(vEnd, 'DD/MM/YYYY')
Perfect! I had no idea the properties of the input box have an effect on the actual variables. Thanks.