[R] Checking datetime value

arun smartpink111 at yahoo.com
Thu Nov 7 20:10:32 CET 2013



Hi,
You can check the dataset for any patterns that are unique for the datetime values. 
For example:
vec1 <-  c(as.character(Sys.time()), format(Sys.time(), "%a %b %d %X %Y %Z"),4324343,format(Sys.time(),"%m-%d-%Y %H:%M:%S"),"aZZCRDDS")
 vec1[grepl(":",vec1)]
#[1] "2013-11-07 15:04:27"             "Thu Nov 07 03:04:27 PM 2013 EST"
#[3] "11-07-2013 15:04:27"    

A.K.


On Thursday, November 7, 2013 10:12 AM, vikrant <vikrant.shimpi at tcs.com> wrote:
Hi ,
I would like to check if a column contains datetime values. (column may
contain any datetime format or just numbers or string). Request your help 




--
View this message in context: http://r.789695.n4.nabble.com/Checking-datetime-value-tp4679963.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list