Skip to content
Back to formatted view

Raw Message

Message-ID: <1383851432.82953.YahooMailNeo@web142603.mail.bf1.yahoo.com>
Date: 2013-11-07T19:10:32Z
From: arun
Subject: Checking datetime value
In-Reply-To: <1383834454305-4679963.post@n4.nabble.com>

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.