I have a point shapefile with a date field, called "Date" which is a Date type field. And I have a time field, called "Time" which is in a String format.
How can I combine these to allow me to enable the use of time for the shapefile? The only solutions I have found are if these field are both in string format, but I am not sure how to convert the date field to string, using [Date].AsString didn't seem to work
If anyone can help that would be amazing, if possible please be very specific in your response as I am quite a beginner at this sort of stuff.
So I had found a possible solution but both fields had to be in String format, so was attempting to convert the Date field to a String field. That's it really, error as follows
I wonder if you could use strftime() to convert your date field to a string, and then merge with your string time field, and then use strptime() to convert that whole mess back to a real live date/time value.
Are you really using shapefiles? I thought the dbf of a shapefile didn't support a date field...
New since Visual dBASE 7, Timestamp fields have a fixed width of eight bytes and are used to store the date and time of a precise moment. Note: The time precision extends to the second.
Esri's shapefile is based on dBASE III, which does not include a timestamp field, but a date field is supported. So, you can store dates but not times.
Just goes to show how often I use shape files. Years a go I responded to a post on the old forum that a friend had made. I don't remember the exact subject, but it involed shape files. With tongue firmly planted in cheek, I posted a comment to him saying 'You know Bob, shape files are now illegal in 14 states....' Holy cow, the frantic comments that followed...
I'll give it a try. Thanks. I've created a shapefile from a csv I was given. Apologies for my lack of knowledge, I only dip in and out of GIS work, what would you otherwise use instead of a shapefile?
I use some flavor of geodatabase feature class. Occasionally I'll export a feature class to a shape file, zip all the components up and email the zip file to a colleague. But in terms of day to day data analysis, feature classes only.