CraigLazar
asked on
Datset to xml file problem
Hi,
I have a dataset with a table in it and i am using the myDS.WriteXml("c:\test1.xm l") function in vb.net 2005.
My dataset is built of a sql statement from SQL2005.
I have a date file and when i view it in debug mode the value is say 2008/11/17 12:00
but when it is written out to the xml file its in this format <QE_x0020_Date>2008-06-30T 00:00:00+0 2:00</QE_x 0020_Date>
Why is it adding T00:00:00+02:00
thanks
I have a dataset with a table in it and i am using the myDS.WriteXml("c:\test1.xm
My dataset is built of a sql statement from SQL2005.
I have a date file and when i view it in debug mode the value is say 2008/11/17 12:00
but when it is written out to the xml file its in this format <QE_x0020_Date>2008-06-30T
Why is it adding T00:00:00+02:00
thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks
Can you show me what you did differently?
ASKER
well its giving me hassles again but what i did in my sql statement is i used the Convert funcion to convert the date field to a varchar(10),103 and then it comes down to my dataset and then writtn out to the xml file - but i am now having issues uding the datasapter on myweb service to return the adjusted data table.
hope this helps
hope this helps
Is your date column as SMALLDATETIME or DATETIME column?
ASKER
in sql its a datetime, does smalldatetime only store the date?
SMALLDATETIME doesn't store the same precision for a date, so it loses some accuracy with seconds. I only use DATETIME when I need that extra precision.
ASKER
i found away around it, in my sql select statements i am using convert and cast functions and its seems to be formatting the data correctly now.
cheers