[Libreoffice-bugs] [Bug 117732] Firebird: Migration: Time values are being changed during migration process (data type TIME and DATETIME)

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sat Jun 15 13:47:39 UTC 2019


https://bugs.documentfoundation.org/show_bug.cgi?id=117732

--- Comment #30 from Robert Großkopf <robert at familiegrosskopf.de> ---
Here another solution, tested with the database
https://bugs.documentfoundation.org/attachment.cgi?id=142236

Add a varchar-field for each date, time or datetimefield:
Dat_dt VARCHAR(19)
Dat_d VARCHAR(10)
Dat_t VARCHAR(8)

Start in Tools → SQL
UPDATE "tst_data" SET "Dat_dt" = LEFT(CAST( "tst_dt" AS VARCHAR ( 30 ) ), 19 ),
"Dat_d" = CAST( "tst_d" AS VARCHAR ( 10 ) ), "Dat_t" = CAST( "tst_t" AS VARCHAR
( 8 ) );

So the dates, times and datetimes will be saved in the HSQLDB as strings, which
wouldn't be changed by migration.

After the migration do start Tools → SQL
UPDATE "tst_data" SET "tst_dt" = "Dat_dt", "tst_d" = "Dat_d", "tst_t" =
"Dat_t";

All fields will be updated to the right date, time or datetime.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20190615/74d4b759/attachment.html>


More information about the Libreoffice-bugs mailing list