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: Fri Oct 14, 2016 11:58 pm (GMT 5.5)

Try,
Code:
 select case when current time  - 1 Hour <= '23:59:59' then  VARCHAR_FORMAT(current date - 1 day,'MM/DD/YYYY')
  else VARCHAR_FORMAT(current date,'MM/DD/YYYY') ) end

_________________
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