Input DateTime in datatable

Input DateTime in datatable

t_machiels
Participant Participant
1,401 Views
8 Replies
Message 1 of 9

Input DateTime in datatable

t_machiels
Participant
Participant

Hi,

 

 

Using the 'Schema Editor' i created a schema for a shapefile. Among the data i want to collect is a date. So i used the 'DateTime' datatype for that field.

No problems there. Connecting to the shapefile and adding geometry work fine as well. Adding most of the data isn't a problem either. 

 

The problem i get is when adding the date. When the "Date"-field is selected in the datatable i can only type in the time. The date i can add with de 'Datepicker' but when i confirm my input the datatable shows "1-1-0001 0:00:00" in the "Date"-field. Opening the 'Datepicker" again it shows the last selected date (27-03-2014).

 

To see what date actually got registered i used the expression builder (in the style editor) to list the dates. The date listed is "0027-03--34 00:00:00"

It appears the date got parsed wrong.

 

 

Does anyone have an idea on how to fix this?

 

Regards,

Tim

0 Likes
1,402 Views
8 Replies
Replies (8)
Message 2 of 9

kajar
Advocate
Advocate

You can change date using properties palette, there you can input just date without time.

Using data table you can input date using datepicker. 

 

Kajar

Message 3 of 9

t_machiels
Participant
Participant

Hello Kajar,

 

Thanks for your suggestion. That works just fine.

It's still annoying it doesn't work in the datatable as it is supposed to.

 

I've been contacted by Autodesk Support but unfortunately they can't reproduce the situation.

 

regards,

Tim

0 Likes
Message 4 of 9

kajar
Advocate
Advocate

Can't reproduce the situation, how its possible? For them it was possible to add or edit date and time without datepicker in data table, just cant believe it?

0 Likes
Message 5 of 9

t_machiels
Participant
Participant

They used the datepicker but their input got applied to the field. When i use the datepicker the date doesn't get applied.

In the properties window i can see the value for date is set to "Null". When i change the date in the properties window it gets accpeted. It also changes in the datatable. But when i use the datepicker in the datatable to change the date again it gets reset to "null". That i can see in the properties window.

 

It's clear. My datepicker is broken. 😞

 

 

Regards,

Tim

0 Likes
Message 6 of 9

t_machiels
Participant
Participant

Hello,

 

 

I'll give an update on this issue.

 

Autodesk support provided me with a solution. I'm not entirely happy with it but it works.

I had to  change the date notation in my Windows 7 system in the "country and languag" section to "dd.MM.yyyy".

This fixed the problem but now everywhere dates show with this notation instead of "d-M-yyyy" which i generaly use.

The dashes appear to be the main issue.

 

The issue has been forwarded to the development team.

 

Thanks to autodesk support.

 

Regards,

 

Tim

0 Likes
Message 7 of 9

Anonymous
Not applicable

Hello,

 

 

to avoid these problems with DateType I normally just save dates as a string.

 

Maintaining a specific format: yyyy-mm-dd, it is easy to order by date and to compare different dates.

 

 

Best regards, Jack

 

https://geomarker.wordpress.com/

 

0 Likes
Message 8 of 9

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

>> it is easy to order by date and to compare different dates.

I would prefer the string type too, especially because transferring datafields between different types of database systems or different regional settings are always a joker for a no-go.

But in some cases you need the type date, e.g. to query about time-frames like show me the records for the last 100 days 😉

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 9 of 9

t_machiels
Participant
Participant

Hey guys,

 

Thanks for the suggestion. I just might do that. I'm not sure if I really need the extra DATETIME functionality (at the cost of changing my system settings). I'll have to think about that. It will depend on what I want to do with the dates.

To me using the DATETIME datatype just appeared to be a clean way to handle data although now that only seems to be an illusion.

 

Regards,

Tim

0 Likes