Pleazzzeee Help!

# Thread: Pleazzzeee Help!

1. Junior Member
Join Date
Dec 1969
Posts
18

## Pleazzzeee Help!

I have a history of today page, that updates every day, heres the problem. ALL my pages are named 1205, 1206,1207, etc. My code is not looking for 2 digits, so on December 5th it looks for 125.asp instead of 1205.asp Please Help me.<BR><BR>HEre is my Code: <BR><BR>&#060;A HREF="../history_today/&#060;%=Month(Date) & -Day(Date)%&#062;.asp"&#062;

2. Senior Member
Join Date
Dec 1969
Posts
2,092

## RE: Pleazzzeee Help!

Hi :) <BR>ok this is maybe not the best way but it works :) <BR><BR>The thing is that I add 100 to the day and then use the Right Function so you will always get the last two digits. <BR><BR>Dim strMonth, strDate, strPage <BR>strMonth = Cstr(Month(Date())) <BR>strDate = Cstr(Day(Date()) + 100) <BR>strPage = strMonth & Right(strDate, 2) <BR>Response.Write strPage

3. Senior Member
Join Date
Dec 1969
Posts
2,092

## If you prefer

&#060;A HREF="../history_today/&#060;%=Month(Date) & Right(Day(Date) + 100,2)%&#062;.asp"&#062;allo&#060;/a&#062; <BR>

4. Junior Member
Join Date
Dec 1969
Posts
18

## RE: If you prefer

Will this work when they day is say December 15? THe page name is 1215.asp will this be looking for 12015.asp or will it still work????

5. Senior Member
Join Date
Dec 1969
Posts
2,092

## RE: If you prefer

Yes it will :)<BR>let&#039s say the day is 23 then I add 100 so 23 + 100 = 123<BR>then I use the Right function and I want the two last digits so<BR>number = 123<BR>Right(number,2) this gives you 23<BR>

6. Junior Member
Join Date
Dec 1969
Posts
18

## RE: If you prefer

Thank you for the help!!!!!!

#### Posting Permissions

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