Quantcast

How to change Date+Hour in Rstudio

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to change Date+Hour in Rstudio

juveluis
This post has NOT been accepted by the mailing list yet.
Hi,

Im new to R, so this is probably an easy question that i can't figure out the solution.
Currently, im trying to change the Data and Hour format in a .csv file (already imported into Rstudio), and i'm having some problems...

As you can see in the image below, everything worked just fine when i used:

"audiencias$Data <- as.Date(audiencias$Data, "#%Y-%m-%d#");" (the old format was: #1996-01-01#)

But when i try to change HoraInício to a new format, i'm having some troubles. I tried to use:  

"audiencias$HoraInício <- as.Date(audiencias$HoraInício, "#%Y-%m-%d %H:%M:%S#");"

And it's not working. :(

Can someone help me?

Thanks,
JuveLuis


Loading...