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 » Add days in a date

Post new topic  Reply to topic
 Add days in a date « View previous topic :: View next topic » 
Author Message
fcotait
PostPosted: Wed Sep 24, 2003 7:45 am    Post subject: Add days in a date Reply with quote

Acolyte

Joined: 28 Feb 2002
Posts: 63
Location: Sao Paulo - Brazil

Hi All,

I need to add a day (from variable) in a date

Ex.

Code:
DECLARE Y INT;
DECLARE X DATE;

SET Y = Environment.Variables.RESULTS[1].DT; -- from Database

SET X = '2003-08-24' + INTERVAL Y DAY;

This code above isn´t working !!!

When I using
Code:
SET X = '2003-08-24' + INTERVAL '1' DAY;
it works

Can I pass a variable value to INTERVAL ? If not, any idea to do this ?

Thanks
_________________
Filipe Cotait
IBM Certified System Administrator - WebSphere MQ
IBM Certified Specialist - MQSeries, WebSphere MQ Integrator
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
EddieA
PostPosted: Wed Sep 24, 2003 8:48 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Maybe Y shouldn't be an INT. In the working code, the interval value is a CHARACTER

Quote:
INTERVAL <interval string> <interval qualifier>


Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
fcotait
PostPosted: Wed Sep 24, 2003 8:50 am    Post subject: Reply with quote

Acolyte

Joined: 28 Feb 2002
Posts: 63
Location: Sao Paulo - Brazil

I already tried this and didn´t work either
_________________
Filipe Cotait
IBM Certified System Administrator - WebSphere MQ
IBM Certified Specialist - MQSeries, WebSphere MQ Integrator
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Add days in a date
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.