Anonymous | Login | 2024-11-21 11:51 CET |
Main | My View | View Issues | Change Log | Roadmap | My Account |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0000401 | Soldat Dedicated Server | Scripting Core | public | 2013-08-26 08:00 | 2014-10-08 23:25 | ||||
Reporter | Mighty | ||||||||
Assigned To | ExHunter | ||||||||
Priority | low | Severity | tweak | Reproducibility | always | ||||
Status | resolved | Resolution | fixed | ||||||
Platform | x86-64 | OS | Mac OS X | OS Version | 10.4 | ||||
Product Version | 2.7.5 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0000401: SCv3 - StrToDate doesn't work as intended | ||||||||
Description | Function 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 Reproduce | Every 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 Information | I failed in finding the working function input | ||||||||
Tags | No tags attached. | ||||||||
John | |||||||||
Attached Files | |||||||||
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 |