Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all articles
Browse latest Browse all 8500

DB2 :: RE: Get correct date and time when current time is over 12 hrs

$
0
0
Author: Rohit Umarjikar
Posted: Sat Oct 15, 2016 2:07 am (GMT 5.5)

I realize now that I can't think of good, it is Friday too. I should go home better icon_smile.gif
After all your comments , this should work and have a Good Weekend!!
Code:
select
   case when (current time      <= '00:59:59' )
               then
     VARCHAR_FORMAT(current date - 1 day,'MM/DD/YYYY')
   else VARCHAR_FORMAT(current date,'MM/DD/YYYY')  end 
      from sysibm.sysdummy1

_________________
Regards,
Rohit Umarjikar
"Knowledge is knowing that a tomato is a fruit, but Wisdom is knowing not to put it in a fruit salad."icon_razz.gif


Viewing all articles
Browse latest Browse all 8500

Trending Articles