Saturday, May 30, 2020

facebook message wise time

select msg_id,
case
when to_char(to_date(wk_dt,'DD-MON-RR HH24:MI:SS'),'DD-MON-RR')=to_char(sysdate,'DD-MON-RR')
then to_char(to_date(wk_dt,'DD-MON-RR HH24:MI:SS'),'HH24:MI AM')
when trunc(sysdate - to_date(wk_dt,'DD-MON-RR HH24:MI:SS'))>=1 and trunc(sysdate - to_date(wk_dt,'DD-MON-RR HH24:MI:SS'))<=6
then to_char(to_date(wk_dt,'DD-MON-RR HH24:MI:SS'),' DY, HH24:MI AM')
when trunc(sysdate - to_date(wk_dt,'DD-MON-RR HH24:MI:SS'))>=7
then to_char(to_date(wk_dt,'DD-MON-RR HH24:MI:SS'),'DD-MON-RR, DY, HH24:MI AM')
end tt
from MSG_MESSENGER
--where msg_id=5

No comments:

Post a Comment

How to install and configure Oracle Apex 24.1 with ORDS 22, Tomcat 9 and Jasper Report 7 on Oracle Linux 8.10

#########################Install Oracle  APEX 24.1################################ ----------------------------------------------------...