Date field changes when importing AXF

3776
2
08-05-2010 09:51 AM
BartPouteau
Occasional Contributor
We have an ArcPad 8 application running on a 2008 GeoXH that auto-populates a datetime field.  When identifying/editing features in ArcPad the format is mm/dd/yy.  When we transfer the data from the AXF file into our SQL Express (ArcMap 9.3.1) database using Trimble's GPS Analyst extension the format is converted to mm/dd/yyyy hh:mm:ss tt.

We don't want the time component to be stored.  On the database end, there's no way of limiting the field to just dd/mm/yyyy and it basically just accepts whatever format it's given.  Somewhere in the AXF to SQL Express transfer the hh:mm:ss tt component is being added (with the correct time which makes me think that ArcPad stores it, it just doesn't display it).

Is there a way to...
1) restrict ArcPad to just record the date portion?
2) prevent the time portion form being added to the database on import?

I've looked at the properties of the DATETIME element in ArcPad Studio as well as the system settings on the GeoXH and there doesn't seem to be anything there to help me out.  A possible work around is to create a new datetime field and to run a calculation based on just the date portion of the original field but I'd rather not mess with the table structure.

Any ideas?

Thanks.

Bart
Tags (3)
0 Kudos
2 Replies
kevinkovacs1
New Contributor II
I have the same problem.  Did you ever come across a solution to this?
0 Kudos
TimHopper
Occasional Contributor III
The field type of "Date" automatically includes the Date/Time stamp.  I only played with it for a few minutes but I haven't found a way to alter the values in this field via vbscript.

Do you have to utilize a Date field or could you use a Text field instead?  If you could utilize a text field, I'd set the default value of the text control to populate the current date and then use some vbscript to only grab the first ten characters from the left.

Via ArcPad Studio:

Go into the properties of the Text control (within the Edit Form) and set it's default value to Now().  This will automatically record the Date/Time within the text field when the edit form is opened.

During the onload event of the form, you could do something similar to the following:

ThisEvent.Object.Pages("page1").Controls("txtDate_Field").Value = Left(ThisEvent.Object.Pages("page1").Controls("txtDate_Field").Value, 10)

What you'll find when you open the edit form is that your Date field (that's a text field type) will have the date written as:

2011-11-09

Just a thought.
0 Kudos