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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Jaganathan BantheswaranRank #170 · 14.1K reputationPosted Jan 29, 2014, 10:45 PM EST
If yes, you can use
var offset = new Date().getTimezoneOffset();
or use the library https://bitbucket.org/pellepim/jstimezonedetect
Rakesh JoganiRank #6,963 · 252 reputationPosted Feb 3, 2014, 3:38 AM EST
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 BantheswaranRank #170 · 14.1K reputationPosted Feb 3, 2014, 6:52 PM EST
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.
shilpa pv10 reputationPosted Jun 10, 2018, 3:25 AM EDT