Hi experts,



I have a problem in Write.foreign command (SAS).



I have a data frame called d.

>d

 Datetime

2006-12-01 00:00:00

2006-12-01 00:10:00

2006-12-01 00:20:00

2006-12-01 00:30:00

2006-12-01 00:40:00

>class(d$Datetime)

[1] "POSIXt"  "POSIXct"



Then I tried with,



write.foreign(d,"Z:\\try_i.sas7bdat"," Z:\\try_i.sas
",package="SAS",dataname="g")



If I use R 2.4.0 version I get the below text file generated.



"01Dec2006 00:00:00"

"01Dec2006 00:10:00"

"01Dec2006 00:20:00"

"01Dec2006 00:30:00"

"01Dec2006 00:40:00"





If I use R 2.2.0 version I get the below text file generated.



2006-12-01 00:00:00

2006-12-01 00:10:00

2006-12-01 00:20:00

2006-12-01 00:30:00

2006-12-01 00:40:00





But I need to use R 2.4.0 and get the text file generated by R 2.2.0.





Could somebody help me on this?



Thank you.

	[[alternative HTML version deleted]]

