ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » cast

Post new topic  Reply to topic
 cast « View previous topic :: View next topic » 
Author Message
harsha priya
PostPosted: Wed Jan 15, 2014 12:14 pm    Post subject: cast Reply with quote

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];

this is the code for CAST and below is my xml,

<EXAMPLE>
<DB>MM-dd-yyyy</DB>
<DB>MM/dd/yyyy</DB>
<DB>yyyy-dd-MM</DB>
</EXAMPLE>

can someone plz sort it out
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Jan 15, 2014 12:17 pm    Post subject: Re: cast Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » cast
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.