How to pass the date as URL parameter
Asked Answered
E

1

8

I am using the titanium to create some app for a particular web application through a webservice.

Here I am passing the date as a URL parameter to call a particular webservice method in java.And the date format is as like below

2015-02-04T05:10:58+05:30

In java service method the expecting parameter type as Date.So how can i send the above format of date through URL Parameter.

Eboat answered 4/2, 2015 at 14:31 Comment(1)
can't you simply send the long value? Btw. i don't know titanium or sakai, but you might need to send a POST request to be able to send this kind of valueBatik
I
4

You can encode the time string using the encodeURIComponent javascript function.

encodeURIComponent("2015-02-04T05:10:58+05:30");

Results in..

2015-02-04T05%3A10%3A58%2B05%3A30
Intermix answered 4/2, 2015 at 14:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.