This topic is locked

Import of German dates DD.MM.YYYY

1/11/2008 5:46:41 AM
PHPRunner General questions
W
wrjost author

Hello, everybody,

trying out the (very impressive) 4.2 beta I have encountered the following problem:
When I import an Excel sheet containing German dates (31.12.1999) into a DATE-field they are all converted to 01.01.1970. Regional settings are ok.
Any ideas?
Greetings,

Wilfried

X
xliner 1/11/2008

Hello, everybody,

trying out the (very impressive) 4.2 beta I have encountered the following problem:
When I import an Excel sheet containing German dates (31.12.1999) into a DATE-field they are all converted to 01.01.1970. Regional settings are ok.
Any ideas?
Greetings,

Wilfried


Wilfried,
you need to format the date field under Excel to TEXT rather than DATE, after the import, MySQL shall take care of appropriate formatting, had been tested by me by today, it works.
HTH Hajo

W
wrjost author 1/13/2008

Hello, Hajo,

thanks for your suggestion, but it doesn't work for two reasons:
1.) The Excel sheet is rather large and needs to be imported every day anew. So why apply your workaround to an obvious bug - on a daily basis?
2.) It doesn't work properly: when you have a cell with a text of '31.12.2006' it functions correctly, but a text of '1.3.05' is imported as '13.01.2008' (=today?!?)
Any other suggestions, dear supporters? <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=24860&image=1&table=forumreplies' class='bbc_emoticon' alt=':rolleyes:' />
Greetings,

Wilfried

X
xliner 1/13/2008

Hello Wilfried,
To 1.) Slight correction, what you call a BUG just refers to German date format import, so, if one is expecting an IMPORT feature which is covering all internationally known date formats, I think, expectations are really going too high as it would be a huge programming task to get it done (if ever) and would of course affect the price of the product. As for me, here to click on the column header, right clicking to open FORMAT CELL as TEXT, is not a huge task, even if going to be done on a daily basis. Further there are affordable automated products out there like e.g. SQLyog (just to name one of others on the market) which can even do IMPORT under "full automated time scheduled snychronization", maybe, a purchase of such an automation tool could be a way out.
To 2.) E.g. "1.3.2008" works well, say, the year in YYYY format is doing the trick.
Finally, as for me, I am seeing the new IMPORT feature under a total different point of view. Most interactive web appliances are used to LOGIN/PW based things where it is then up to the user to take on the web content on his own. So far, so good, yet if I may want to forget about LOGIN/PW, CAPTCHA, MD5 Hashing etc pp in regard to security, I am seeing a way out here by the IMPORT feature to let the admin get a mail with the .xls file enclosed for easy and simple mouse click actioned import of the data to be displayed within the web by the admin, just to avoid that some wrongdoers of all kinds are "contaminating" the web content from the tricky end where details on same would really boost the frame here. I am more than happy about the IMPORT feature and already some programming successfully to take care of things like e.g. CONCAT and CALCULATE and else outside PHPR 4.2 coded environment.
HTH Hajo

W
wrjost author 1/22/2008

Hello, Hajo and support team,

sorry for being so slow in answering Hajo's suggestions, but I didn't have time to go on testing (now build 334) - the daily chores...
First of all, to make one thing clear: I think PHPRunner is a terrific product and has had the best support I have encountered in over 20 years in the business - so far. All I am asking is to make a great product perfect.
@Hajo:

I have a third-party output to deal with. All the date fields are already formatted as German dates. When you go into Excel oder Open Office and right-click such a column and change that very format from DATE to TEXT as you suggest, all the cells revert to the five-digit number which they represent (e.g. 25.07.2001 becomes 37097). That is useless for the import into my MySQL database via PHPRunner.
@support team:

Any suggestions? (Saving the file as CSV doesn't work, either.)
Greetings,

Wilfried
P.S.: I have tried a number of variations of date formats in the following csv-file:
[codebox]name,dob

Eddie - NO,30.07.1981

Eddie's brother - NO,07.07.1981

Elly - YES,1981-07-30

Sue - YES,07-07-07

Sue's sister - YES,07.07.07

Sue's other sister - YES,1977.07.07

Billy - YES,81-7-30

Billy's brother - YES,81/7/30

[/codebox]
Result: when the date field is given in the order Year, then Month and finally Day, it works (= YES in the name field). In all other cases it does not (= NO).

W
wrjost author 1/29/2008

Hello, everybody,

slowly I am growing frustrated.
I have now tried Build 340 of the 4.2 beta.
I kept it very simple: just one table with two fields (NAME as varchar and DOB as date).

I entered two names and two birthdates.

I then exported them into both Excel format and as csv.

I then reimported those two files.
Excel: imports both datasets, but the DATE field is changed to "01.01.1970"

CSV: doesn't import at all
So, I assume there is some more finetuning to be done.
And I am really looking forward to a reply from the support team of Xlinesoft.
<img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=25314&image=1&table=forumreplies' class='bbc_emoticon' alt=':(' />
Regards,

Wilfried

J
Jane 1/29/2008

Wilfried,
thank you for pointing me to this bug.

We're working on it.

W
wrjost author 2/15/2008

Hello, Jane,

the bug still exists in 4.2 build 347.
When I export a record and reimport it immediately "as is", I get
1.) in case of Excel format: "The filename O:\xampp\tmp\phpA5.tmp is not readable"
2.) in case of csv: goodlines: 0 total_records: 1

...

Error: in the line: 'HP 4200',NULL,'"1',NULL,convert(datetime,'1970-01-01',120),NULL,'"EDV',NULL,'"29.06.2003','"29.06.2003"'
Number of records: 1

Imported: 0

Not imported: 1
My csv-file looks like this:
"Druckertyp","Drucker_ID","SN","Standort","Kaufdatum"

"HP 4200","1","CNFX","EDV","29.06.2003"
Greetings,

Wilfried