Created
June 25, 2013 14:54
-
-
Save dodopok/5859107 to your computer and use it in GitHub Desktop.
Formatar aaaa-mm-dd H:i:s para dd/mm/aaaa H:i:s - Javascript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
datahora = '2013-01-02 15:12:20'; | |
datahora = datahora.split(' '); | |
data = datahora[0] | |
hora = datahora[1] | |
data = data.split('-').reverse().join('/'); | |
datahora = data+' '+hora; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment