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 » Date Format

Post new topic  Reply to topic
 Date Format « View previous topic :: View next topic » 
Author Message
Yash
PostPosted: Thu Sep 26, 2002 2:11 pm    Post subject: Date Format Reply with quote

Novice

Joined: 26 Sep 2002
Posts: 24

Hai,

I am getting the date value in Fri Sep 26 15:13:06 EDT 2003 format.And I have to transfrom this format to yyyy-mm-dd in WMQI. I am using the below code


DECLARE TransDt DATE;
DECLARE YTransDt CHARACTER;
DECLARE MTransDt CHARACTER;
DECLARE DTransDt CHARACTER;
DECLARE TTransDt CHARACTER;

SET TransDt = "InputBody"."Honda_Peoplesoft.ExportSchema.dtd"."DATAAREA"."ariba.core.HondaComCntl_Export"."HondaComCntlHdrTransDt";
SET YTransDt = EXTRACT(YEAR FROM TransDt);
SET MTransDt = EXTRACT(MONTH FROM TransDt);
SET DTransDt = EXTRACT(DAY FROM TransDt);
SET TTransDt = YTransDt || '/' || MTransDt || '/' || DTransDt ;


SET
"OutputRoot"."XML"."COMMIT_CNTRL_TRAN_CHECK_UPDATE"."MsgData"."Transaction"."COMCNTL_TRN_HDR"."TRANS_DT" = TTransDt;

It is giving me error at
SET TransDt = "InputBody"."Honda_Peoplesoft.ExportSchema.dtd"."DATAAREA"."ariba.core.HondaComCntl_Export"."HondaComCntlHdrTransDt";

Can anyone please help me.


Thanks,
_________________
Yash
Back to top
View user's profile Send private message
kirani
PostPosted: Thu Sep 26, 2002 3:00 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Your input message does not have data in ESQL DATE format. ESQL date format is DATE 'yyyy-mm-dd' .. so you cannot assign your input data directly to DATE field.
Try using SUBSTRING function instead.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
Yash
PostPosted: Mon Sep 30, 2002 9:08 am    Post subject: Reply with quote

Novice

Joined: 26 Sep 2002
Posts: 24

Thanks kiran.I tried with SUBSTRING and its working fine.
_________________
Yash
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 » Date Format
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.