Posted: Wed Jan 15, 2014 12:14 pm Post subject: cast
Newbie
Joined: 15 Jan 2014 Posts: 1
DECLARE DATE1 CHAR '09-14-1978';
DECLARE DATE2 CHAR '09/14/1978';
DECLARE DATE3 CHAR '1978-14-09';
DECLARE DB DATE;
DECLARE TEST CHAR;
SET DB = CAST (DATE1 AS DATE FORMAT 'MM-dd-yyyy');
SET TEST = EXTRACT(MONTH FROM DB);
SET DB = CAST (DATE2 AS DATE FORMAT 'MM/dd/yyyy');
SET TEST = EXTRACT(MONTH FROM DB);
SET DB = CAST (DATE3 AS DATE FORMAT 'yyyy-dd-MM');
SET TEST = EXTRACT(MONTH FROM DB);
SET OutputRoot.XMLNSC.DOB = InputRoot.XMLNSC.EXAMPLE.DB[1];
SET OutputRoot.XMLNSC.DOB = InputRoot.XMLNSC.EXAMPLE.DB[2];
SET OutputRoot.XMLNSC.DOB = InputRoot.XMLNSC.EXAMPLE.DB[3];
Posted: Wed Jan 15, 2014 12:17 pm Post subject: Re: cast
Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
harsha priya wrote:
can someone plz sort it out
Sort what out? What are you expecting to happen? What actually happened? What have you already tried to resolve whatever problem you're encountering before you posted your request for us to do your job for you? _________________ Honesty is the best policy.
Insanity is the best defence.
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