-
New to DB2 - Date functions
I can't seem to find any documentation on the dateadd and/or datediff functions in DB2, so I take it that they don't exist.
I need to calculate the First day of the month and the first day of the week based on a date field. So far, here is what I figured out:
First Day of month of field process_date
process_date-DAY(process_date) DAYS+ 1 DAY
First Day of week of field process_date
process_date-Dayofweek(process_date) days + 1 DAY
Anyone with a better way? Any flaws in the above functions?
dag
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|