php - Convert Mysql date with JavaScript to euro format -


I am trying to convert a MySQL date to a Euro date with Javascript. But no success is my code:

  var t = "2014-03-29 13:12:01" .split (/ [-:] /); // Apply each element in the date function var d = new date (t [0], t [1] -1, t [2], t [3], t [4], t [5]); Warning (d);  

I get the result of something like this: Sat Mar 29 2014 23:24:28

Is there any way to set it? The way to do something like 31.12.2014 with javascript? I can not use a server-side language such as PHP

If you do not take care of the options for Safari users.

  var t = new date ("2014-03-29 13:12:01"); T.toLocaleString ('fr'); // ⇒ "29/3/2014 13:12:01" T. Tolocelstrings ('ru'); // ⇒ "29.3.2014 13:12:01"  

Hope it helps.


Comments

Popular posts from this blog

sql - Find last match with latest inserted name in table -

c# - XML serialize base class without knowing derived class -

ios - Invalid IPA: missing embedded provisioning profile. Are you sure this is an ad hoc? -