Skip to content

Time of day

3 messages · Rguy, Brian Ripley, Enrico Schumann

#
On 25/06/2013 06:59, Rguy wrote:
which will not parse and in any case there are no such times.
> t <- Sys.time()
 > tt <- format(t, "%H:%M")
 > tt <= "22:00" && tt >= "06:00"
[1] TRUE

Note the use of && not &.
PLEASE do: no HTML mail ....
#
On Tue, 25 Jun 2013, Rguy <rguy at 123mail.org> writes:
^^^^^                  ^^^^^
this will not work: the times need to be something that R understands,
eg, numeric values such as 2200 or character values such as "22:00"
strftime(Sys.time(), "%H:%M")