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
- :
- Compare Dates
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
‎Feb 25, 2010
02:09 PM
Compare Dates
Hi,
I have this Function to get a File date
if (GetFileInfo (TARGETDIR + "\\abc.exe", FILE_DATE, nResult, sResult) = 0)
then
MessageBox ("File Date: " + sResult, SEVERE);
endif;
Is there a way to compare the the date sResult (YYYY-MM-DD) with a date object i create? ...
I want to be able to find out if the Date Modified date is greater > then another date.
Any ideas?
Thanks for your help
I have this Function to get a File date
if (GetFileInfo (TARGETDIR + "\\abc.exe", FILE_DATE, nResult, sResult) = 0)
then
MessageBox ("File Date: " + sResult, SEVERE);
endif;
Is there a way to compare the the date sResult (YYYY-MM-DD) with a date object i create? ...
I want to be able to find out if the Date Modified date is greater > then another date.
Any ideas?
Thanks for your help
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 26, 2010
02:31 AM
Check out
FeatureFileInfo ( szFeatureSource, szFeature, szFile, nInfo, nvResult, svResult );
FeatureFileInfo ( szFeatureSource, szFeature, szFile, nInfo, nvResult, svResult );
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 26, 2010
02:27 PM
If you can express your other date in yyyy-mm-dd form, too, a straight string comparison should do what you want.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 01, 2010
03:01 PM
The StrCompare function compares two strings. The comparison is not case sensitive.
Syntax
StrCompare ( szStringA, szStringB );
you think this will return 1 if StringB is a more recent date then StringA?
Syntax
StrCompare ( szStringA, szStringB );
you think this will return 1 if StringB is a more recent date then StringA?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 01, 2010
03:18 PM
Correct, on a character-by-character basis, "2010-03-01" follows "2010-02-28", "2009-12-31", etc., so as long as all strings use that format (no shortening the month to one digit, and so on) you should be fine.
![](/skins/images/8CE4FAD0DE6F3A6F9D0567434D2D2DAE/responsive_peak/images/icon_anonymous_message.png)