MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000401Soldat Dedicated ServerScripting Corepublic2013-08-26 08:002014-10-08 23:25
ReporterMighty 
Assigned ToExHunter 
PrioritylowSeveritytweakReproducibilityalways
StatusresolvedResolutionfixed 
Platformx86-64OSMac OS XOS Version10.4
Product Version2.7.5 
Target VersionFixed in Version 
Summary0000401: SCv3 - StrToDate doesn't work as intended
DescriptionFunction takes a string as an argument, but as if it started from index 2, e.g. "2013-08-26" will be passed as "013-08-26". However, " 2013-08-26" is not a valid input as well.

This causes StrToDate( DateToStr( Now ) ) to not work.
Steps To ReproduceEvery single one below causes an error.

StrToDate(DateToStr(Date()));
StrToDate(' 2013-08-26');
StrToDate(' 13/08/10');
StrToDate(' 15/03/75');
StrToDate(' 15-03-75');
Additional InformationI failed in finding the working function input
TagsNo tags attached.
John
Attached Files

- Relationships

-  Notes
(0002293)
ExHunter (developer)
2014-09-07 00:27

related to this

http://stackoverflow.com/questions/1713526/pascal-string-to-date [^]

trying to figure out how to include those 2 variables nicely into ScriptCore3.
(0002294)
ExHunter (developer)
2014-09-07 01:34
edited on: 2014-09-07 01:38

Please provide feedback in the upcoming 1.6.8 beta.

Use the new stuff:

Global.ShortDateFormat := 'd/m/y';
Global.DateSeparator := '/';

before any execution of StrToDate (once is okay tho).

(0002316)
Mighty (developer)
2014-10-04 12:40

Issues listed before are all still present despite setting the Global properties.
(0002317)
ExHunter (developer)
2014-10-04 22:33

look,

try this:

Global.DateSeparator := '-';
WriteLn(DateToStr(StrToDate('15-03-75')));

for me it works. Please note that DateSeparator needs to be the same char as the separator used in your string.
(0002326)
ExHunter (developer)
2014-10-08 23:25

Well, closing this now (setting this to resolved)

use StrToDateTime instead in the next version.

- Issue History
Date Modified Username Field Change
2013-08-26 08:00 Mighty New Issue
2013-09-09 15:45 Falcon Status new => acknowledged
2014-09-07 00:27 ExHunter Note Added: 0002293
2014-09-07 00:27 ExHunter Assigned To => ExHunter
2014-09-07 00:27 ExHunter Status acknowledged => assigned
2014-09-07 01:34 ExHunter Note Added: 0002294
2014-09-07 01:34 ExHunter Status assigned => feedback
2014-09-07 01:34 ExHunter Note Edited: 0002294 View Revisions
2014-09-07 01:38 ExHunter Note Edited: 0002294 View Revisions
2014-10-04 12:40 Mighty Note Added: 0002316
2014-10-04 12:40 Mighty Status feedback => assigned
2014-10-04 22:33 ExHunter Note Added: 0002317
2014-10-08 23:25 ExHunter Note Added: 0002326
2014-10-08 23:25 ExHunter Status assigned => resolved
2014-10-08 23:25 ExHunter Resolution open => fixed


Copyright © 2000 - 2024 MantisBT Team
Powered by Mantis Bugtracker