i am trying to map xsd:date and xsd: time datatype element to xsd:datetime
(pattern:yyyy-MM-ddTHH:mm:ss.SSSZZZ)
As i cannot directly map both the input elements to Datetime datatype i have converted them to string format and then datetime format. here is what i am doing:
Code:
DECLARE FormattedDateTimeValue CHARACTER;
SET FormattedDateTimeValue = CAST(Input.RequestData.StartTransDate AS CHARACTER FORMAT 'yyyy-MM-dd')||'T'|| CAST(Input.RequestData.StartTransTime AS CHARACTER FORMAT 'HH:mm:ss.SSSZZZ');
SET Output.start_date_time = CAST(FormattedDateTimeValue AS TIMESTAMP FORMAT 'TU');
where datatype of start_date_time is XSD:datetime
result: i get the value of FormattedDateTimeValue = 2009-04-20T00:00:00
but the the value of Output.start_date_time = 2009-04-20 00:00:00.0000
so in Output.start_date_time the letter T is missing is there any way that i can retain t in the output to match the datetime format required in the output xsd??
The Trace node is not ( necessarily ) showing you what the XMLNSC parser will output. It's showing you the contents of the logical message tree. The values written by the Trace node are in their ESQL lexical form. XML and XMLNS actually use the ESQL lexical form, but XMLNSC purposely complies with the XML Schema standard and puts in the 'T'.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum