Home » Developer & Programmer » Forms » how to get week number as per financial year starts & end (oracle )
how to get week number as per financial year starts & end [message #395204] Tue, 31 March 2009 12:08 Go to next message
mohaninforakle
Messages: 55
Registered: January 2009
Member
hai experts,

I have a requirement from my clients,that is i want to get an week number for a particular date,so I used following command to get the week number,like

to_char(datefield,'WW')
this command i used,but my problem is i want to get the week number as per the financial year its starts from March to apirl.That is march 1 to 7 days is a first week and so on.Please help me somebody how to do that.


Re: how to get week number as per financial year starts & end [message #395354 is a reply to message #395204] Wed, 01 April 2009 03:40 Go to previous messageGo to next message
rajy_salim
Messages: 204
Registered: January 2008
Location: Beirut - Lebanon
Senior Member
Try to use the following in a cursor and then fetch to your item
select to_char(<your_date_field>,'iw') - to_char(add_months(trunc(<your_date_field>,'year'),2),'iw') + 1
from dual;


Rajy
Re: how to get week number as per financial year starts & end [message #395410 is a reply to message #395204] Wed, 01 April 2009 06:08 Go to previous message
mohaninforakle
Messages: 55
Registered: January 2009
Member
thanks for your reply

its working fine.


thanks a lot.
Previous Topic: rerieve updated column name
Next Topic: connect 6i with MS Access
Goto Forum:
  


Current Time: Mon Dec 05 14:39:21 CST 2016

Total time taken to generate the page: 0.05417 seconds