p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Javascript How-To (http://p2p.wrox.com/forumdisplay.php?f=87)
-   -   how to replace a string with another string/number (http://p2p.wrox.com/showthread.php?t=26661)

crmpicco March 10th, 2005 10:37 AM

how to replace a string with another string/number
 
function setdate(Fdate)
                        Select Case Fdate
                        Case "JAN"
                          validdate = "01"
                        Case "FEB"
                         validdate = "02"
                        Case "MAR"
                         validdate = "03"
                        Case "APR"
                         validdate = "04"
                        Case "MAY"
                         validdate = "05"
                        Case "JUN"
                         validdate = "06"
                         Case "JUL"
                         validdate = "07"
                        Case "AUG"
                         validdate = "08"
                         Case "SEP"
                         validdate = "09"
                        Case "OCT"
                         validdate = "10"
                        Case "NOV"
                         validdate = "11"
                         Case "DEC"
                         validdate = "12"
                        end select
                        setdate = validdate
                        end function


www.crmpicco.co.uk
www.milklemonadechocolate.uk.tt

Santhi March 10th, 2005 12:39 PM

Use String.Replace("oldvalue","newvalue");



crmpicco March 10th, 2005 12:42 PM

sorry, that was just a 'tip' a small 'how-to'.
not a question. thanks

www.crmpicco.co.uk
www.crmpicco.co.uk.tt
www.milklemonadechocolate.uk.tt
www.griswolds.uk.tt

Santhi March 10th, 2005 12:44 PM

Cool tip..Put in subject as Tip


crmpicco March 14th, 2005 12:59 PM

ok, no problem

www.crmpicco.co.uk
www.crmpicco.co.uk.tt
www.milklemonadechocolate.uk.tt
www.griswolds.uk.tt


All times are GMT -4. The time now is 09:10 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.