Converting Date to Week Number + Week Day

# Thread: Converting Date to Week Number + Week Day

1. Senior Member
Join Date
Dec 1969
Posts
147

## Converting Date to Week Number + Week Day

I need to convert a date into the week number (1-52) and week day (1-7) but cannot find any functionality in ASP for this.<BR><BR>I also need to go the other way, i.e. converting Year, Week Number and Week Day into a date.<BR><BR>Any suggestions?

2. jd
Senior Member
Join Date
Dec 1969
Posts
850

## RE: Converting Date to Week Number + Week Day

Did you try reading the manual?<BR><BR>WEEKDAY() function<BR><BR>The week of the year can be easily calculated.

3. jd
Senior Member
Join Date
Dec 1969
Posts
850

## RE: Converting Date to Week Number + Week Day

You might also want to apply the DATEDIFF() function, also covered by the free docs.<BR><BR>:)

4. Senior Member
Join Date
Dec 1969
Posts
147

## RE: Converting Date to Week Number + Week Day

Did you try reading my question?<BR><BR>I asked about a way to calculate the week number (not the day in the week), based on a given date. This must be done in ASP (not VB or C++).<BR><BR>Examples:<BR>January 3, 1999 equals Day 7 in week 53 (1998)<BR>January 4, 1999 equals Day 1 in week 1 (1999)<BR>January 3, 2000 equals Day 1 in week 1 (2000)<BR><BR>You see, January 1&#039st is not always a Monday, but Mondays are always the first day of the week.<BR><BR>Any more suggestions?<BR>

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•