Hi Jim,
If there is no value in the field, I want it to look like so:
<DateRemoved></DateRemoved>
The fields are date fields in Access. In access if there is no value in the
field, it is left blank.
I want the dates in the XML file to be in a short format which is compatible
with Access.
The data is being exported into an xml file, which is then imported into an
Adobe form. The user will modify the data, send the form back, form data is
exported to xml, the xml is then imported back into Access to update the
tables. This process is all automated using VBA.
Using this process, date fields that were originally blank in the tables now
have the 1899 date in them after the updated data is imported.
Jen
"JimBurke via AccessMonster.com" <u49905@uwe> wrote in message
news:93dd1035e051c@uwe...
> I've never exported to XML, so I'm not sure if there's a way to tell it
> what
> to do if the value of the field is null - obviously it's using some
> default
> behavior. What do you want to appear in the XML file if there is no value
> for
> date? is the problem the default value it's putting in, the <DateRemoved>
> tag,
> or both?
>
> Are the dates stored in the table as Date values or as Text values? You
> mentioned that they're in the table in short format, but I'm guessing that
> they are stored in date format and simply displayed in short format using
> Access Formats. How do you want the date formatted in the XML? Do you want
> something like:
>
> <EndDate>2010-02-16</EndDate>
>
> What exactly are your requirements for what you need in the XML file for
> those dates?
>
>
> Jennifer Robertson wrote:
>>I have a set of tables that I'm exporting into one xml file. That part
>>works.
>>
>>What is odd is the dates. In the tables all the dates are in short format.
>>A
>>date field may also be empty.
>>
>>The xml shows a date/time format like so:
>><EndDate>2010-02-16T00:00:00</EndDate>
>>
>>and if there is no date it adds a default date like so:
>>
>><DateRemoved>1899-12-30T00:00:00</DateRemoved>
>>
>>Any idea why is it doing this? And how I can resolve it?
>
> --
> Jim Burke
>
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/For...dules/200903/1
>