function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
shan876shan876 

DateTime Format????PLEASE HELP MEEEEEEEEEE

Hi all:
   So I got my URL working finally picking up all the necessary fields I need to fill out a Page in edit mode...
The only issue I am having is my date/time field...
When I query it brings up this 2008-12-12T02:01:00.000Z
Of course when you have that in the URL, and it fills into the field as 2008-12-12T02:01:00.000Z I get an error immediately about date/time format...

How do I change that so when my query writes to the URL its writing the correct way it should be to write to the field on the page...

Thanks
Happy Holidays
Drew1815Drew1815
In javascript, there are methods such as escape() and encodeURI() to convert a string to being URL-friendly.
Quick searches on google for those standard javascript methods will show examples.

shan876shan876
Thanks for the reply, that does not work...
Greg HGreg H
You'll need to do some manipulation of your date/time result from the query prior to passing the data to the URL. Assign your date/time value from the query to a new string variable and then pull that string apart to create the correct format for your edit page (ie 12/16/2008 3:46 PM) date/time value.
-greg