|
| |
|
|
Lydecker
Posts: 609 From: Oxshott, Surrey, England (UK) Status: offline
|
.ASP Masking help please - 7/14/2005 18:30:41
Hi please could someone help me with a small piece of .asp? I have the value '0405' being returned from Request("pyear") and I want the page to display 04/05. i.e masking off the first 2 characters then adding a '/' then adding the final two characters masked off! (I can easily do this in C, but my weak .asp syntax is letting me down) Cheers!
|
|
|
|
BeTheBall
Posts: 6381 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: .ASP Masking help please - 7/14/2005 19:44:05
Assuming the input is always DDMM or MMDD, this should work: <%=Left(Request("pyear"),2)&"/"&Right(Request("pyear"))%>
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
Lydecker
Posts: 609 From: Oxshott, Surrey, England (UK) Status: offline
|
RE: .ASP Masking help please - 7/14/2005 20:48:23
Cheers - just what I was after - an .asp 'shortcut' function like Right and Left, rather then masking off bits! [Functional code in the end was: <%=Left(Request("pyear"),2)&"/"&Right(Request("pyear"),2)%> ]
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|