Home » SQL & PL/SQL » SQL & PL/SQL » Help in Dates (Forms 6i)
Help in Dates [message #313676] Mon, 14 April 2008 02:51 Go to next message
mudabbir
Messages: 235
Registered: April 2006
Location: Kuwait
Senior Member

Hi,

How can we find out all the dates in a week just by giving a week no.?

Mudabbir
Re: Help in Dates [message #313677 is a reply to message #313676] Mon, 14 April 2008 02:52 Go to previous messageGo to next message
Michel Cadot
Messages: 65144
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Datetime Format Models

Regards
Michel
Re: Help in Dates [message #313680 is a reply to message #313677] Mon, 14 April 2008 03:04 Go to previous messageGo to next message
Littlefoot
Messages: 21148
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Obviously, you'll need to use a row generator and simple mathematics.

Here's an idea: I suppose you need "this year" - find the first day of this year (using one of DATE functions). As a week has 7 days, do some arithmetic in order to find first day of desired week. Finally, using row generator technique (connect by level might be useful) display these 7 days.
Re: Help in Dates [message #313683 is a reply to message #313676] Mon, 14 April 2008 03:15 Go to previous messageGo to next message
flyboy
Messages: 1848
Registered: November 2006
Senior Member
> How can we find out all the dates in a week just by giving a week no.?

It is impossible without giving a year too.
If the 1st week of the year starts on January, 1st, look at Littlefoot's solution (beware the leap years).
If you are talking about ISO week, you may find useful Getting the start and End date of a week thread.
Re: Help in Dates [message #313686 is a reply to message #313683] Mon, 14 April 2008 03:33 Go to previous message
mudabbir
Messages: 235
Registered: April 2006
Location: Kuwait
Senior Member

Thanks Flyboy, your answere helped...
Thanks everybody for their help.
Previous Topic: droppping a snapshot (merged)
Next Topic: getting random results from a procedure
Goto Forum:
  


Current Time: Sun Aug 20 14:16:57 CDT 2017

Total time taken to generate the page: 0.12542 seconds