I'm creating a form that asks the user to input a date in a date time field (usually it will be the present date or close to it). The users will use the drop-down calendar date picker to choose the date.
This is what I have for the 10 day date field but the output is always January 10 1900. I assume it has to do with epoch but have no clue how to fix this
if
(HasValue(DateTimeField1))then
Num2Date((Date2Num(DateTimeField1)
+10),"EEEE,MMMM D,YYYY")
else
null
I would appriciate any help I could get.
Thanks!
Views
Replies
Total Likes
Here's an option:
if (Date1.rawValue ne null) then
Num2Date(Date2Num(Date1.formattedValue, "MM/DD/YYYY") + 10, "MM/DD/YYYY")
else
null
endif
Views
Replies
Total Likes
I tried this and still get a return value of Wednesday, January 10, 1900 reguardless of date entered.
Any thoughts...
Views
Replies
Total Likes
Sample attached. See Date Assigned and subsequent review dates. Change the Assigned date and the dates change
Views
Replies
Total Likes
delete
Views
Replies
Total Likes
I got it mostly working by messing with the date format in the script and display pattern plus data pattern in the object control panel.
It seems to be very touchy and different date formats don't seem to play well with each other. I am not getting EEEE, MMMM D,YYYY working.
I am getting MM/DD/YYY to work which is good but I would rather display the dates with the day if possible. If I use the EEEE,MMMM D,YYYY I still get the January 10 1900.
Thanks for all the help so far!!!
Views
Replies
Total Likes
After messing around some more I was able to get the output dates to display EEEE,MMMM DD,YYYY. But only if the input date is formatted MM/DD/YYYY.
This is liveable but would be great to have consistent formats.
Views
Replies
Total Likes
Did you see this post?
Views
Replies
Total Likes