Here is a sample snippet that show how to use it :-
function ToClientFormat(ClientDate) { var dt = new Date(ClientDate); return dt.localeFormat(Sys.CultureInfo.CurrentCulture.dateTimeFormat.FullDateTimePattern); }
Now this will display the date as
Friday, December 10, 2010 11:07:05 AM
As shown you will be able to use Sys.CultureInfo.CurrentCulture.dateTimeFormat to get which ever the format you were interested in, refer to MSDN for more details Sys.CultureInfo.dateTimeFormat
“Make everything as simple as possible, but not simpler.”
– Albert Einstein
0 comments:
Post a Comment