|
Subject:
|
string problem
|
|
Posted By:
|
shoakat
|
Post Date:
|
10/19/2004 5:01:44 PM
|
dateUntil=cstr(convNull (objHistoryRate("dtRateTo"))) strGrid =strGrid+ " <TD><INPUT type=""text"" size=15 id=txtdateUntil name=txtdateUntil value='"+ dateUntil+ "'></TD>" function convNull(str) if isNull(str) then convNull = "" else convNull = str end if end function Please help me to explain why we are using cstr the first code. I have not understood the string.
|
|
Reply By:
|
happygv
|
Reply Date:
|
10/19/2004 5:11:06 PM
|
what is the value that comes with objHistoryRate("dtRateTo")? Also I hope that you should use AMPERSAND (&) instead of PLUS (+) there for concatenation.
_________________________ - Vijay G Strive for Perfection
|
|
Reply By:
|
shoakat
|
Reply Date:
|
10/19/2004 8:05:57 PM
|
the value coming from "dateRate" are date like 09/09/2004 and for "dateHourlyRate" is 50. I hope this will help you to give the explanation. Thanks
|
|
Reply By:
|
happygv
|
Reply Date:
|
10/20/2004 8:53:29 AM
|
Hi Shoakat,
I could see the usage of CSTR required when the "dtRateTo" contains any of the following possible values.
If it contains Date - then the CStr function will return a string that contains a date in the short-date format. If it contains Null - then a run-time error will occur. If it contains Empty - then the CStr function will return an empty string ("").
That is the reason too for using a ConvNull function there.
Hope that explains. Cheers!
_________________________ - Vijay G Strive for Perfection
|