Skip to Main Content

Database Software

Idea : Date functions which will give output as days, years, minutes, seconds etc...

NSK2KSNMay 23 2016 — edited May 23 2016

Hi All,

This idea is to have a function for date which will take input as three parameters.

name of the function can be DIFF_DATES (DATE1 WITH TIME STAMP, DATE2 WITH TIME STAMP, OPTIONAL PARAMETER) -> If we pass input as date1 and date2 and third paramter as 'D' then the function should return output as difference between two dates in days.

below table will give a clear idea:

23-MAY-201622-APR-2016MONTHS1 Month / 30 days
23-MAY-201622-MAY-2015YEARS1 year / 12 months / 365 days
23-MAY-2016 22:10:0023-MAY-2016 22:40:15MINUTES20MINUTES 15 SECONDS

This queries were asked several times by many of the developers

Please let us know whether you would like to have support for SQL date function which will help in reducing the customized functions and also as this is the most important and used function in a day to day life. @"connor"

Post Details
Added on May 23 2016