View Issue Details

IDProjectCategoryView StatusLast Update
0005618JEDI VCL00 JVCL Componentspublic2011-09-21 11:57
ReporterchickenrudiAssigned Toobones 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionsuspended 
Product VersionDaily / GIT 
Target VersionFixed in Version 
Summary0005618: TJvCsvDataSet doesn't read "shortened" date formats
DescriptionI tried to read DateTime values of the following format:

2011/6/29 13:45:00
2011/6/29 14:00:00
...


As you can see the month has one digit only. There was only one line I had to add to the sources so that such values can also be read.

I attached a small patch that shoud give you a hint what I've done.


TagsNo tags attached.

Activities

2011-07-14 14:41

 

JvCsvData.patch (519 bytes)
Index: JvCsvData.pas
===================================================================
--- JvCsvData.pas	(revision 13089)
+++ JvCsvData.pas	(working copy)
@@ -5193,6 +5193,8 @@
       if Index > Len then
         Break;
       Ch := AsciiDateTimeStr[Index];
+      if ((AsciiDateTimeStr[Index] = Separators[I]) or (AsciiDateTimeStr[Index] = Separators2[I])) and (U > 1) then
+        Break;
       if not ((Ch <= #255) and (AnsiChar(Ch) in DigitSymbols)) then
       begin
         //could raise exception here:
JvCsvData.patch (519 bytes)

jfudickar

2011-07-15 21:20

developer   ~0018826

Could you please add a small sample also so that we easy test your patch.

Regards
Jens

obones

2011-09-21 11:57

administrator   ~0018935

No news, suspending

Issue History

Date Modified Username Field Change
2011-07-14 14:41 chickenrudi New Issue
2011-07-14 14:41 chickenrudi File Added: JvCsvData.patch
2011-07-15 21:20 jfudickar Note Added: 0018826
2011-07-15 21:20 jfudickar Status new => feedback
2011-09-21 11:57 obones Note Added: 0018935
2011-09-21 11:57 obones Status feedback => resolved
2011-09-21 11:57 obones Resolution open => suspended
2011-09-21 11:57 obones Assigned To => obones