Archives of the TeradataForum
Message Posted: Wed, 24 Oct 2001 @ 17:12:40 GMT
I don't believe there is a built in function, but the system calendar could be used to easily provide the first day of the current month. Use the following:
Select calendar_date - (day_of_month+1) from sys_calendar.calendar where calendar_date eq date ;
FYI, The sys_calendar database is created through the execution of a Database Initialization Program (DIP) script. There is a utility that is used to run these scripts. If the database doesn't exist, you will need to do run the DIP script. It does not require a restart of the DBMS.
Thomas F. Stanek
|Copyright 2016 - All Rights Reserved|
|Last Modified: 27 Dec 2016|