PC Review


Reply
Thread Tools Rate Thread

Converting date to week number over several years

 
 
spudsnruf
Guest
Posts: n/a
 
      2nd Sep 2009
Hi,

I understand how to use the weeknum() function to conert a date to a week
number, but this is only useful if need to convert 1 year. What should I do
to convert 4 consecutive years to a week number, so all weeks numbers are not
the same. e.g I want to make January 1st 2006 as week '1' and January 1st
2007 '53' instead of 1 again. Thanks very much.


 
Reply With Quote
 
 
 
 
Jacob Skaria
Guest
Posts: n/a
 
      2nd Sep 2009
With the date in A1
=ROUNDUP(DATEDIF(DATE(2006,1,0),A1,"d")/7,0)

If this post helps click Yes
---------------
Jacob Skaria


"spudsnruf" wrote:

> Hi,
>
> I understand how to use the weeknum() function to conert a date to a week
> number, but this is only useful if need to convert 1 year. What should I do
> to convert 4 consecutive years to a week number, so all weeks numbers are not
> the same. e.g I want to make January 1st 2006 as week '1' and January 1st
> 2007 '53' instead of 1 again. Thanks very much.
>
>

 
Reply With Quote
 
spudsnruf
Guest
Posts: n/a
 
      2nd Sep 2009
Absolute genius. Works perfectly. saved me hours and hours. Thanks a million.

"Jacob Skaria" wrote:

> With the date in A1
> =ROUNDUP(DATEDIF(DATE(2006,1,0),A1,"d")/7,0)
>
> If this post helps click Yes
> ---------------
> Jacob Skaria
>
>
> "spudsnruf" wrote:
>
> > Hi,
> >
> > I understand how to use the weeknum() function to conert a date to a week
> > number, but this is only useful if need to convert 1 year. What should I do
> > to convert 4 consecutive years to a week number, so all weeks numbers are not
> > the same. e.g I want to make January 1st 2006 as week '1' and January 1st
> > 2007 '53' instead of 1 again. Thanks very much.
> >
> >

 
Reply With Quote
 
David Biddulph
Guest
Posts: n/a
 
      2nd Sep 2009
.... or just =ROUNDUP((A1-DATE(2006,1,0))/7,0) ?
--
David Biddulph

"Jacob Skaria" <(E-Mail Removed)> wrote in message
news:0CA2DB3E-7E74-4809-AA42-(E-Mail Removed)...
> With the date in A1
> =ROUNDUP(DATEDIF(DATE(2006,1,0),A1,"d")/7,0)
>
> If this post helps click Yes
> ---------------
> Jacob Skaria
>
>
> "spudsnruf" wrote:
>
>> Hi,
>>
>> I understand how to use the weeknum() function to conert a date to a week
>> number, but this is only useful if need to convert 1 year. What should I
>> do
>> to convert 4 consecutive years to a week number, so all weeks numbers are
>> not
>> the same. e.g I want to make January 1st 2006 as week '1' and January 1st
>> 2007 '53' instead of 1 again. Thanks very much.
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting a date to a numeric (1-7 number) day of the week John_ Microsoft Access 4 6th Feb 2008 07:59 PM
Converting date to Week number Tom Tripicchio Microsoft Access Queries 2 26th Oct 2006 07:02 PM
Converting number of days to years and months Dave Cobb Microsoft Excel Worksheet Functions 4 24th May 2005 09:14 PM
Finding a week number from a given date - Custom Defined Week Numb =?Utf-8?B?V2VuZHk=?= Microsoft Access Form Coding 3 14th Feb 2005 10:49 PM
Re: Converting week number and year to date. Jay B. Harlow [MVP - Outlook] Microsoft VB .NET 2 22nd Aug 2003 01:58 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:34 AM.