counting weekdays since birthday [message #275814] |
Mon, 22 October 2007 15:32  |
Duke
Messages: 14 Registered: August 2006
|
Junior Member |
|
|
Ok say... i am a bit of an workaholic,
and i want to count the weekdays since my birhday, to count the days I could have been working.....
How would I do this,
Something like
select username,dateofbirth, ..... from users;
|
|
|
|
Re: counting weekdays since birthday [message #275853 is a reply to message #275814] |
Tue, 23 October 2007 01:13  |
 |
vamsi kasina
Messages: 2112 Registered: October 2003 Location: Cincinnati, OH
|
Senior Member |
|
|
If so, you could have got the answer till now.Quote: | since my birhday, to count the days I could have been working.....
| Oh! you have been working since your birth day!!
Anyway, does the following works for you?
1. get the days (sysdate - DOB)
2. convert them into weeks (divide the above by 7)
3. multiply with 5. I assume you have worked on holidays also, as you are a workaholic.
By
Vamsi
|
|
|