[RESOLVED]How can modify dates in javascript ?

Hi , I am using dates of different cultures and i have an issue with the Bulgarioan (10.11.2014 r) format . When i pass this date to lets say a sql query from javascript . it says the date is incorrect. 

What is the best way of formatting dates .?  

Thanks

Hi robby32,

If you want to format your date in the client side, I suggest that you can try the format plugin:

https://github.com/phstc/jquery-dateFormat

If you want to format your date in the server side,and insert it into database,i suggest that you can try code  below:

DateTime dt = new DateTime(2008, 3, 9, 16, 5, 7, 123);

String.Format("{0:y yy yyy yyyy}", dt);  

You can refer to the link below about how to format

http://www.csharp-examples.net/string-format-datetime/

Best Regards,

Kevin Shen.

Leave a Reply