Abiel de Groot
asked on
TSQL Convert SQL smalldatetime to string for MS Access Date/Time
Hi All,
I have a stored procedure which collects a recordset which populates and array. This array array in turns loops and populates an MS Access 2007 Database table.
Everything goes well right up to 'Report_DC' (Date Created). This either copies poorly or not at all. There are no NULL's all the reports have a value for this field which look like this: 2012-11-02 17:38:00
I have tries
, CAST (rpt.Report_DC as varchar)
but it does not work. When I open the Access table I get 'XXXXXXXXXXXX'
Any ideas.
Kind regards
Abiel M de Groot Sanders
I have a stored procedure which collects a recordset which populates and array. This array array in turns loops and populates an MS Access 2007 Database table.
Everything goes well right up to 'Report_DC' (Date Created). This either copies poorly or not at all. There are no NULL's all the reports have a value for this field which look like this: 2012-11-02 17:38:00
I have tries
, CAST (rpt.Report_DC as varchar)
but it does not work. When I open the Access table I get 'XXXXXXXXXXXX'
Any ideas.
Kind regards
Abiel M de Groot Sanders
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
In the meantime I overlooked the fact there were some local solutions too. As I am using ASP I was simply able to use FormatDateTime(ArrReports( 3,ki),2) to parse the string.
Kind regards
Abiel M de Groot Sanders
Kind regards
Abiel M de Groot Sanders
So you are getting data into the field, but it's not what you expect? You're getting the XXXXXXXXXX string instead?