Date/Time not formatting in HTML5
Feature label and Description fields that are date/time do not format correctly in HTML5 - the following feature description:
{STATUS}<br/>Problem: {REQUESTTYPE}<br/>Description: {COMMENTS}<br/>Date: {REQUESTDATE}
is fomated in silverlight as:
Alert
Problem: Other
Description: Monkeys!!!!
Date: 2/15/2013 4:39:25 PM
In HTML5, the date comes out as:
Alert
Problem: Other
Description: Monkeys!!!!
Date: 1360946365000
-
Hi James,
How did you get to those results? From a Query Task in a workflow?
The Query Task will return results as their native data types, whereas an identify task will return results as formatted strings. The Silverlight API is presently better at handling native data types and formatting them as a string - looks like the Javascript API is giving you a "seconds after the epoch" date value (not very useful to anyone but a computer)
Regards,
-Malcolm
0 -
Hi Malcolm,
Yes, it is in a workflow, but rather an assigmnment:
Date.Now.ToUniversalTime TO serviceFeatureSet.Features(0).Attributes(RequestDateFieldName)
This is taken directly from the GTX sample "CitizenServiceRequestDemo"
Thanks,
James
0 -
I'm just trying to figure out where to place the js to convert this back to a string date/time - the function is available in js, just need to work it into .js I think...Any suggestions?
0 -
I'm having this same issue with HTML5 and calling a date in a display form, did you ever get resolved?
0
Please sign in to leave a comment.
Comments
4 comments