This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: compare decimal numbers (not for versions)
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 13, 2009
02:27 PM
compare decimal numbers (not for versions)
Hello, I need to compare 2 dates in this format: YYYYMM.DD in InstallScript. First I tried comparing it just as real number, but there is no data type that supports real number.
At this point, how can I use StrGetTokens to take numbers before decimal and after decimal? Would VersionCompare work with this particular format?
Or any other suggestions?
Thanks.
At this point, how can I use StrGetTokens to take numbers before decimal and after decimal? Would VersionCompare work with this particular format?
Or any other suggestions?
Thanks.
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 13, 2009
02:37 PM
If the date strings will always contain leading zeroes ("2010.0101", never "2010.101"), can you just use string comparison with < or StrCompare?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 09, 2009
05:09 PM
StrCompare worked, thank you!
![](/skins/images/3B39CE851FDD5528C393F146EB70A2D0/responsive_peak/images/icon_anonymous_message.png)