[R] write.csv changes the format of the date

Santosh Srinivas santosh.srinivas at gmail.com
Mon Nov 1 14:14:28 CET 2010


Dear Group,

Why does write.csv modify the date format when it write to a file.

I have the following variable Param_Dat:

dput(Param_Dat)
structure(list(Last_Successful_Run = structure(1L, .Label = "30/10/2010",
class = "factor")), .Names = "Last_Successful_Run", class = "data.frame",
row.names = c(NA, 
-1L))


When I do:
write.csv(Param_Dat,"Param.csv",quote=F,row.names=F)

The format of the info in the file is:
Last_Successful_Run
31OCT2010

I want to retain the dd/mm/YYYY format ...

Please advise.

----------------------------------------------------------------------------
--------------------------
Thanks R-Helpers. Yes, this is a silly question and it will not be repeated!
:-)



More information about the R-help mailing list