1

im looking for the function in jquery, that giveme the same format of time, like this.

date( 'Y-m-d\TH:i:sP');
//the output is like this.
2013-10-30T18:10:28+01:00

I need this kind of format but in jquery, for put in my var.

Thanks!

1 Answer 1

1

Neither JavaScript nor jQuery have built-in library methods for doing this in one step. You can find various plugins to help, or write your own:

See Where can I find documentation on formatting a date in JavaScript?

And check out http://momentjs.com/ or https://github.com/phstc/jquery-dateFormat

Sign up to request clarification or add additional context in comments.

1 Comment

i found this is UTC:yyyy-mm-dd'T'HH:MM:ss'Z'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.