3

When I create a new shapefile in QGIS, I'm presented with the "New Vector Layer" window, where I specify the Shapefile type (Point/Line/Polygon) and am then able to create attribute fields.

I'm only able to select the field type as Text/Integer/Decimal - how do I go about creating a date field type?

1 Answer 1

5

The way I have done this is as follows:

 - Add a column to your attribute table (ie: Date, Text, 10 characters)
 - Open the layer properties window and navigate to the Fields tab
 - On the Date line under the Edit widget, change it from Line edit to Calender
 - To add a date to the attribute, double click the Date field record in the attribute table and click on the ... button
 - Choose the appropriate date![QGIS Date Attributes][1]
2
  • I tried this when the table is in a MSSQL database. I get an error message that says that QGIS could not commit the changes because the number of fields is not correct. Is this a permissions 'thing' with SQL databases?
    – Johanna
    Mar 30, 2015 at 23:48
  • On further inspection and research, after closing my QGIS project and opening again, the new attribute column is there.
    – Johanna
    Mar 30, 2015 at 23:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.