Home » SQL & PL/SQL » SQL & PL/SQL » need function for last month date?
need function for last month date? [message #404621] Fri, 22 May 2009 08:34 Go to next message
tondapi
Messages: 99
Registered: August 2007
Location: usa
Member
Hi,

I have one requirement like, based up on todays date i want to find the last month 1st week date. What function i want to use for that one.


thanks

Re: need function for last month date? [message #404626 is a reply to message #404621] Fri, 22 May 2009 08:57 Go to previous messageGo to next message
Michel Cadot
Messages: 64098
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
the last month 1st week date

What does that mean? Put definition and examples (for different countries).

Regards
Michel
Re: need function for last month date? [message #404627 is a reply to message #404621] Fri, 22 May 2009 09:01 Go to previous message
joicejohn
Messages: 327
Registered: March 2008
Location: India
Senior Member
I didn't understand your requirement properly especially
Quote:

based up on todays date i want to find the last month 1st week date



Which day's date you want. A week has seven days. Post a sample data or a valid test case.
Anyways try to go through the following function and see if it helps:
TRUNC Function (with dates)
ADD_MONTHS Function

Also, please go through and follow the posting guidelines mentioned in OraFAQ Forum Guide.

Edit: Added Link
Regards,
Jo

[Updated on: Fri, 22 May 2009 09:02]

Report message to a moderator

Previous Topic: Table relationships
Next Topic: ACL parameter problem
Goto Forum:
  


Current Time: Fri Dec 02 12:33:21 CST 2016

Total time taken to generate the page: 0.10167 seconds