how to find date difference . i have two dates . current and expiration
date.
Is there any db2 function
date diff
Moderators: Anuj Dhawan, Moderator Group
- Kalicharan
- Moderator
- Posts: 31
- Joined: Wed Feb 08, 2006 1:51 pm
Hi Guru,
Kalicharan
And here is the some date related infoSelect DAYS(DATE(:ws-exp-dt)) - DAYS(CURRENt DATE) into :ws-date-diff from Table
- SQL Date and Time Functions
DAYNAME ==> Returns a mixed case character string containing the name of the day (e.g., Friday) for the day portion of the argument.
DAYOFWEEK ==> Returns the day of the week in the argument as an integer value in the range 1-7, where 1 represents Sunday.
DAYOFWEEK_ISO ==> Returns the day of the week in the argument as an integer value in the range 1-7, where 1 represents Monday.
DAYOFYEAR ==> Returns the day of the year in the argument as an integer value in the range 1-366.
DAYS ==> Returns an integer representation of a date.
JULIAN_DAY ==> Returns an integer value representing the number of days from January 1, 4712 B.C.
(the start of Julian date calendar) to the date value specified in the argument.
MIDNIGHT_SECONDS ==> Returns an integer value in the range 0 to 86 400 representing the number of seconds between midnight and the time value specified in the argument.
MONTHNAME ==> Returns a mixed case character string containing the name of month (e.g., January) for the month portion of the argument.
TIMESTAMP_ISO ==> Returns a timestamp value based on date, time or timestamp argument.
TIMESTAMP_FORMAT ==> Returns a timestamp from a character string that has been interpreted using a character template.
TIMESTAMPDIFF ==> Returns an estimated number of intervals of the type defined by the first argument, based on the difference between two timestamps.
TO_CHAR ==> Returns a character representation of a timestamp that has been formatted using a character template.
TO_CHAR is a synonym for VARCHAR_FORMAT.
TO_DATE ==> Returns a timestamp from a character string that has been inter-preted using a character template.
TO_DATE is a synonym for TIMESTAMP_FORMAT.
WEEK ==> Returns the week of the year of the argument as an integer value in range 1-54. The week starts with Sunday.
WEEK_ISO ==> Returns the week of the year of the argument as an integer value in the range 1-53.
Kalicharan
FREE TUTORIALS
Tutorials
Free tutorials from mainframegurukul
- JCL Tutorial
Covers all important JCL concepts. - Cobol Tutorial
This tutorials covers all Cobol Topics from STRING to COMP-3. - DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. - SORT Tutorial
This Tutorial covers all important aspects of DFSORT with examples - CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page