Home » SQL & PL/SQL » SQL & PL/SQL » how to get first day in the date
how to get first day in the date [message #254195] Thu, 26 July 2007 02:27 Go to next message
Messages: 28
Registered: July 2007
Junior Member
how i can get the first day in the date

for example i have this date 22-mar-07 how i can get its first day so the result be like 01-mar-07 please help
Re: how to get first day in the date [message #254198 is a reply to message #254195] Thu, 26 July 2007 02:33 Go to previous message
Michel Cadot
Messages: 65084
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
SQL> select trunc(sysdate,'MONTH') from dual;

01/07/2007 00:00:00

1 row selected.

Another way is to remember that the first day of the month is always the one with number 1. Wink

Previous Topic: need suggestion with logic
Next Topic: know the @
Goto Forum:

Current Time: Sun Jul 23 06:03:46 CDT 2017

Total time taken to generate the page: 0.03899 seconds