Hello
I need client machine date and time format which is set by user in javascript.
Not at server side.
Thanks Regards
Rakesh Jogani
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
shilpa pvPosted Jun 10, 2018, 7:25 AM
Jaganathan BantheswaranPosted Feb 3, 2014, 11:52 PM
You cant access the Client Machine information from Javascript. But you can get the date in client machine's format using new Date().toLocaleDateString().
This method will return you the date in the client machine's format. THen you need to analyze the format.
Rakesh JoganiPosted Feb 3, 2014, 8:38 AM
I not need client machine timezone offset
I need only date format like "MM/DD/YY" or "DD/MM/YYYY"
i want only format string ("MM/DD/YY" or "DD/MM/YYYY") which is set by client in own system from
Open Control Panel >> Date and Time >> Change Date and Time >> Change Calendar Setting .
Jaganathan BantheswaranPosted Jan 30, 2014, 3:45 AM
If yes, you can use
var offset = new Date().getTimezoneOffset();
or use the library https://bitbucket.org/pellepim/jstimezonedetect