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: 64153
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: 20901
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: 1832
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: Index performance in Loading Target during ETL process
Next Topic: Cursor is not taking the not in class and NOT IN IS Mal Functioning (merged 2 threads)
Goto Forum:
  


Current Time: Sun Dec 11 08:22:47 CST 2016

Total time taken to generate the page: 0.09019 seconds