sas - Converting to_char to put (Oracle SQL to PROC SQL) -
i'm trying convert oracle sql statement sas equivalent.
here line in question in oracle sql
case when ((to_char(csm.csm_start_time, 'hh24mi') >= '0700' , to_char(csm.csm_start_time, 'hh24mi') <= '1659') the actual data in format: 2010-02-01 08:00:00
is there similar way grab 24 hour equivalent time date time field in 1 shot oracle sql version?
i know to_char equivalent put , closest format hhmm. i'm not sure how put together.
if it's datetime field in sas, you'd want use hour function.
if hour(csm_start_time) ge 7 , hour(csm_start_time) lt 17 (or use in or between depending on context).
Comments
Post a Comment