Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 29th, 2004, 05:00 PM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 119
Thanks: 0
Thanked 0 Times in 0 Posts
Default difference in the codwithout ltrim and right trim

dateFrom = rtrim(ltrim(cstr(convNull(objHistoryRate("dtRateFr om")))))
     dateUntil = rtrim(ltrim(cstr(convNull(objHistoryRate("dtRateTo ")))))
     HourlyRate= rtrim(ltrim(cstr(convNull(objHistoryRate("decHourl yRate")))))

Can any body tell me what is the difference between above code dateFrom = cstr(convNull(objHistoryRate("dtRateFrom")))
     dateUntil = cstr(convNull(objHistoryRate("dtRateTo")))
     HourlyRate= cstr(convNull(objHistoryRate("decHourlyRate")))
your answer will be appreciated.




 
Old October 29th, 2004, 08:23 PM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi,

  Why to use RTRIM and LTRIM at the same time.
You can use TRIM() it suppress all leading and trailing spaces.

You are using convNull function. You can observe the code there.


---------
Rajani

 
Old October 30th, 2004, 01:40 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Numan,

The difference is, RTRIM() - trims the trailing space in the string passed as param, whereas LTRIM() - trims the leading space. TRIM() does that both at once.

Hope that helps.
Cheers!

_________________________
- Vijay G
Strive for Perfection





Similar Threads
Thread Thread Starter Forum Replies Last Post
trim with ListFolderContents melkin Classic ASP Components 1 September 12th, 2008 03:03 PM
Trim MathLearner VB Databases Basics 2 May 16th, 2007 11:38 PM
rtrim, ltrim and len khronikles Pro VB Databases 1 June 5th, 2006 03:31 PM
String.trim() mrfox BOOK: Professional JavaScript for Web Developers ISBN: 978-0-7645-7908-0 1 January 8th, 2006 12:23 AM
Trim() NeoGeo ASP.NET 1.0 and 1.1 Basics 2 January 21st, 2004 11:19 PM





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