Hi All,
I need to convert a string to integer and to compare the converted integer value with a integer .
If the values are same i need to update the status file as 'Y'Else 'N'
i am using the follwoing:
If DSLink71.DETAILROWCOUNT= AsInteger(StringToDecimal(Trim(DSLink71.VALUE,0,'L'))) Then 'Y' Else 'N'
The value of DSLink71.DETAILROWCOUNT is 1000 (integer) and the vlaue of DSLink71.VALUE is 000001000 (String).
The output of the file is 'N'. Please help me in solve this.
Thanks & Regards,
Kumar66
String to Integer
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 15
- Joined: Thu Aug 07, 2008 2:56 am
Re: String to Integer
Try with the following code.
It works fine for me.
If DSLink3.count = AsInteger(StringToDecimal(TrimLeadingTrailing(DSLink3.value))) Then "Y" Else "N"
It works fine for me.
If DSLink3.count = AsInteger(StringToDecimal(TrimLeadingTrailing(DSLink3.value))) Then "Y" Else "N"
Karthik
Make It Work Make It Right Make It Fast
Make It Work Make It Right Make It Fast
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 251
- Joined: Mon Jun 09, 2008 5:52 am