I have a xls full of data. I have created a schema to use that is working for everything, except the date column. The date column has dates like so: 5/11/2000 in it. When I save the XML I get 36657. Here is my schema:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<COLA>
<Congress>
<CongressTH>106th Congress (1999-2000)</CongressTH>
<Subject>Designate certain national forest system lands within the boundaries of the state of VA as Wilderness area</Subject>
<Committee>House Committee on Agriculture</Committee>
<Witness>Jim Furnish</Witness>
<Date>9/19/2011</Date>
<Bill>HR 4646</Bill>
<Link>2001_Testimony.pdf</Link>
</Congress>
<Congress>
<CongressTH>106th Congress (1999-2000)</CongressTH>
<Subject>Community Forest Restoration Act and Lake Tahoe Restoration Act</Subject>
<Committee>House Committee on Agriculture</Committee>
<Witness>Randle G. Phillips</Witness>
<Date>5/11/2000</Date>
<Bill>HR 3388 and S 1288</Bill>
<Link>2000_Testimony.pdf</Link>
</Congress>
</COLA>
I have changed the date schema to various different layouts (example):
<Date>5/11/2000</Date>
<Date>5.11.2000</Date>
<Date>May 11, 2000</Date>
<Date>5-11-2000</Date>
These all do the same. Returning 36657. I have cut and pasted from Excel and I have cut and pasted from Notepad to strip formatting. Both do the same.
What do I need to change in the Schema to get this date to render correctly when saved?
Thanks!
The format of your excel cell data, is probably in DATE format, I don’t think this transfers as expected when doing XLS to XML Schema. Try setting that entire columns data format to TEXT, that should pass the string value of the cell which is what you are trying to get across.
To do this;
Your date should come through as the actual 05/11/2000 string.