querytask - Data time zone
I have a workflow with a query task activity that fetches a bunch of records from the database. I present the result (a list of datetimes) in a form to the user. The problem is I can only seem to get the time as UTC, not in my local time zone. This works fine in every other part of my site. It is only a problem within this querytask in the workflow.
Is there a way to display local time?
0
-
Hi Anders,
Which method are you using to populate the form?
It looks like if you use the Query Details section in the Form Designer (or the equivalent Assign activities in the RuntimeModifications) to populate an item like a ComboBox, the values will appear in your local timezone on the form when you run it in the viewer (not in the simulator though).
If you use FeatureSetToDataItemList, and then use that list to populate a ComboBox, then you get the dates exactly as returned by ArcGIS Server (not in local time). That sounds more like the method you were describing. I think the difference may be that the FeatureSetToDataItemList is running server-side and would convert all your dates to strings without any considerations, whereas the time gets handled client-side when you do it the other way, and your own machine's timezone is used.
My recommendation would be to use the first method if you're not already.
-Amanda0 -
Hi Amanda,
Thank you. You were right. I was using FeatureSetToDataItemList to populate my ListBox. I have now changed to doing the query in the form, and it works except for one thing. I can no longer sort the list the way I want. I would like to sort it with the newest record at the top, but now it is sorted the other way around. Is there a way to do this?
Anders0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
2 kommentarer