Subject | Re: Different separators for date and time |
---|---|
Author | Svein Erling Tysvær |
Post date | 2005-06-10T11:12:42Z |
Hmm, export/import... that could mean trouble. What if the exporting
computer has defined dd.mm.yyyy as date format and the importing
computer mm.dd.yyyy? To make it bulletproof, you'd have to export the
date format as well and parse the sql before the import. Either that,
or use your own 'standard' when exporting and always expect this
format when importing.
Hope you find a good solution,
Set
computer has defined dd.mm.yyyy as date format and the importing
computer mm.dd.yyyy? To make it bulletproof, you'd have to export the
date format as well and parse the sql before the import. Either that,
or use your own 'standard' when exporting and always expect this
format when importing.
Hope you find a good solution,
Set
--- In firebird-support@yahoogroups.com, "Salvatore Besso" wrote:
> hello Magnus and Svein,
>
> thanks for your replies.
>
> Yes Svein, you are perfectly right that it is better to use AsDate
> properties and that is what I always do, but in this case the error
> popped out during the processing of a SQL script:
>
> INSERT INTO TABLE(NUMFIELD, DATEFIELD,...._
> VALUES(1, '05.25.2005',.... <--- KA-BOOM :-)
>
> It is a feature of the application that exports a table as a SQL
> script and another application then imports that script. So I think
> that it is better to temporary change the separators at least in the
> export/import functions instead than for the whole application, so
> the script will be built with separators that FB knows (and the user
> will be happy with his separators when viewing data) and then
> restore the original separators just before exiting from the
> export/import functions (of course into a try finally block).
>
> Regards
> Salvatore