How to pass the date as URL parameter

吃可爱长大的小学妹 提交于 2019-12-10 13:46:40

问题


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.


回答1:


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


来源:https://stackoverflow.com/questions/28323895/how-to-pass-the-date-as-url-parameter

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!