AnsweredAssumed Answered

System Hour Time  Comparision

Question asked by venkat1 on Jun 21, 2013
Latest reply on Jun 24, 2013 by another_martink
Hi All,

Please help with the syntax of the following code

I need to check if the the sytemtime more than 2 pm


@SELECT:DIM:USER_DEF:IMPLIED:resource: q.res_id || q.period_id:resperiod@
,@SELECT:DIM_PROP:USER_DEF:IMPLIED:resource:q.period_start:Periodstart@
,@SELECT:DIM_PROP:USER_DEF:IMPLIED:resource:NVL(q.ts_id,0):tsid@
,@SELECT:DIM_PROP:USER_DEF:IMPLIED:resource:(CASE q.ts_status WHEN 0 THEN 'Unsubmitted' WHEN 1 THEN 'Submitted' WHEN 2 THEN 'Returned' WHEN 3 THEN 'Approved' WHEN 4 THEN 'Posted' WHEN 5 THEN 'Adjusted' ELSE 'Not Created' END):timesheet_status@
,@SELECT:DIM_PROP:USER_DEF:stoplight:resource:CASE
WHEN q.period_start > sysdate THEN NVL(q.ts_status,4)
WHEN q.period_start <= sysdate and localtimestamp >= '2' ----------------------- Systime Greater than 2 pm
THEN NVL(q.ts_status,2)
ELSE NVL(q.ts_status,9) END:stoplight@
,@SELECT:DIM_PROP:USER_DEF:IMPLIED:resource:CASE WHEN q.ts_status IN (0, 1, 2, 3, 4, 5) THEN 1 ELSE 0 END:allow_link@


Thanks in advance

Outcomes