navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

.ASP Masking help please

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> .ASP Masking help please
Page: [1]
 
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.

(in reply to Lydecker)
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)%>

]

(in reply to BeTheBall)
BeTheBall

 

Posts: 6381
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: .ASP Masking help please - 7/14/2005 20:53:50   
Glad you were able to figure out what I meant to type, instead of what I actually typed. :)

_____________________________

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.

(in reply to Lydecker)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> .ASP Masking help please
Page: [1]
Jump to: 1





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