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 » Using Interval

Post new topic  Reply to topic
 Using Interval « View previous topic :: View next topic » 
Author Message
CoolDude
PostPosted: Tue Aug 10, 2004 8:48 pm    Post subject: Using Interval Reply with quote

Apprentice

Joined: 17 Jan 2004
Posts: 39

Folks,

I would like to subtract 3 months from the date
here is my code

DECLARE tmpDate DATE DATE'2004-07-31';
SET OutputRoot.XML.OutDate = tmpDate - INTERVAL '3' MONTH;

I am recieving this error

Code:

RecoverableException  BIP2327E: Invalid fields for Gregorian date value: Year '2004'; Month '4'; Day '31'.

An attempt was made to interpret the following fields as a valid date in the Gregorian calendar. Year: 2004, Month: 4, Day: 31. (January is represented by a month value of 1.)

 Correct the message flow definition to ensure that the values being provided as a date value are correct.  This may involve validating that data being read from either a database or a message content is suitable for use as a date.


used the code to highlight the exception.

Let me know what can be done.
_________________
Correct Me from Wrong . If i am correct Appreciate Me
Back to top
View user's profile Send private message
wooda
PostPosted: Wed Aug 11, 2004 1:05 am    Post subject: Reply with quote

Master

Joined: 21 Nov 2003
Posts: 265
Location: UK

Hi,

I think this is a bug.
You should raise a problem with IBM.
Maybe they already have a fix for this.

I tried it on V5 CSD3 (ie. the latest version available) and it still happened.

In the meantime I guess the only solution would be to write a function in ESQL to intelligently add intervals to dates.
Back to top
View user's profile Send private message
PGoodhart
PostPosted: Wed Aug 11, 2004 5:18 am    Post subject: Reply with quote

Master

Joined: 17 Jun 2004
Posts: 278
Location: Harrisburg PA

April doesn't have 31 days!
Hence bad date.
_________________
Patrick Goodhart
MQ Admin/Web Developer/Consultant
WebSphere Application Server Admin
Back to top
View user's profile Send private message
wooda
PostPosted: Wed Aug 11, 2004 6:38 am    Post subject: Reply with quote

Master

Joined: 21 Nov 2003
Posts: 265
Location: UK

Bravo PGoodhart.

However you slightly missed the point.

If you subtract 3 months from a date you would expect the result to be a valid date.

So

'2004-07-31' - 3 months
equals either '2004-04-30' or '2004-05-01' but not '2004-04-31'

The broker needs to sensibly handle this eventuality or else arithmatic on dates requires lots of unecessary custom code.
Back to top
View user's profile Send private message
Craig B
PostPosted: Mon Aug 16, 2004 5:31 am    Post subject: Reply with quote

Partisan

Joined: 18 Jun 2003
Posts: 316
Location: UK

Hi,

This is a defect in the product and there is APAR IC38466 that is aiming to fix this in a future fix pack. If you raise a PMR with IBM support you should be able to get a fix for this problem.

Regards
Craig
_________________
Regards
Craig
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 » Using Interval
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.