Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Date fields are imported as PyQt4.Core.Qdate objects #24

Closed
GoogleCodeExporter opened this issue Mar 13, 2015 · 3 comments
Closed

Date fields are imported as PyQt4.Core.Qdate objects #24

GoogleCodeExporter opened this issue Mar 13, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

Hi (bonjour Romain), 

In versions  7.0.2 et 7.0.1, on QGIS 2.2, we can't import correctly date 
fields. They are converted to  PyQt4.Core.Qdate text objects. 
See attached image. 
Quite a severe bug preventing us from using Qspatialite. 

Cheers 
Régis

Original issue reported on code.google.com by regis.ha...@gmail.com on 20 Mar 2014 at 3:35

Attachments:

@GoogleCodeExporter
Copy link
Author

Hi,

Have you tried to make a query based on the date field ? It should be working.
Idem when lloading data to QGIS canvas.
It's only a display bug I guess.

Can you try and let me know the results ?

I'll have a look a this soon.

Original comment by romain.r...@gmail.com on 21 Mar 2014 at 10:32

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

Fixed in new version

Original comment by romain.r...@gmail.com on 6 Feb 2015 at 8:03

  • Changed state: Fixed

@gispoole
Copy link

Hi, I'm having this issue again in QGis 2.14.

I'm using Qspatialite version 7.0.4 in QGis 2.14. We use QSpatialite to save selected polygons from an MSSQL (2008) layer into spatialite databases.

Since Qgis 2.14 we have noticed that any dates held in the SQL table as a date data type are corrupted when the data is imported into a spatialite database through QSpatialite.

Original Data from MSSQL layer within QGis: before_spatialite

Data after importing into spatialite database using QSpatialite: after_spatialite

N.B the field name is the data type used to create the table in MSSQL.

I have tried using the DB manager and this fails stating 'Error 5 - creation of fields failed'

We currently have a workaround that involves using QGis 2.8 to import the layer and then opening it through QGis 2.14 to continue editing, this doesn't corrupt the data.

I'd be grateful of any help. Let me know if I need to log a new issue,
Thanks!

see: https://gis.stackexchange.com/questions/251055/qgis-qspatialite-plugin-corrupting-dates-when-importing-layers/251107#251107

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants