Difference in number of days using DB2 days function
Difference in number of day using DB2 days function DAYS – This returns the number of days starting from date ‘0001-01-01’. SELECT DAYS(‘2010-10-31’) FROM SYSIBM.SYSDUMMY1 This will query will return 734076. If you wish to calculate difference in number of days between two dates then the following query can be used SELECT DAYS(‘2010-10-31’)-DAYS(‘1990-10-01’) FROM SYSIBM.SYSDUMMY1 This […]
Difference in number of days using DB2 days function Read More »