>>I don't know. It is just when I set the value in the XML (again using my own serializer) and then (in the SQL Server SP) I try to get the value back, I get the error. It appears that the code in the SQL Server SP expects the separators. Why?, I don't know.
>
>Your code:
>
>
SELECT @TargetDate = [Fld FldName].value('.','char(10)') ...
>
>forces the result to be 10 characters wide, with no separators, there are 2 spaces trailers that would cause an exception. Simply use varchar(10) instead of char(10). If time might be included then that would be more than 10 or shifting would cause first character to be included, prefer something like varchar(20).
The varchar(10) does not work (still error). But if I change the char(10) to char(8), I can specify the date format without spaces ("yyyyMMdd HH:mm:ss"). So, this is what I will do.
Thank you.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham