problem passing timestamp as part of xml data

  • I am trying to pass an timestamp value to the stored procedure using xml. If i use varchar(1000) as the datatype and then cast it for comparisons it changes its value. any workarounds?

  • I assume you are loading XML into the db, not the other way around.

    When opening & loading an XML document into the db, I declare my dateime field as say varchar(20), then load the result into a temp table (lettting it create its own schema). I then insert the results of my temp table into my created table, which has the datetime field declared as a datetime. the conversion works fine, as long as I ensure that the format of my original datetime is accurate.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply