I have a problem when i try to get message with put date/time beetween two dates (beginDate and endDate). Here is my query receiveSelected("JMSTimestamp BETWEEN " + pBeginDate + "AND " + pEndDate). A message is in the queue and the timestamp is between the two values passed in argument. But nothing is returned by the query
Asked
Active
Viewed 2,112 times
2 Answers
1
I've tried on a recent WMQ version and this works correctly; I've output the 10 messages, the timestamp and the message id. Then only got some of the messages.
The correct ones are returned: have you confirmed the message is committed? and visible?
You do mention 'date' - is the selector in the correct format..
------------------------------------------------------------------------
0:1389200177672 ID:414d5120514d5f76385f62696c626f20ff30cd5220008002
1:1389200178874 ID:414d5120514d5f76385f62696c626f20ff30cd5220008003
2:1389200180076 ID:414d5120514d5f76385f62696c626f20ff30cd5220008004
3:1389200181277 ID:414d5120514d5f76385f62696c626f20ff30cd5220008005
4:1389200182477 ID:414d5120514d5f76385f62696c626f20ff30cd5220008006
5:1389200183677 ID:414d5120514d5f76385f62696c626f20ff30cd5220008007
6:1389200184877 ID:414d5120514d5f76385f62696c626f20ff30cd5220008008
7:1389200186078 ID:414d5120514d5f76385f62696c626f20ff30cd5220008009
8:1389200187279 ID:414d5120514d5f76385f62696c626f20ff30cd522000800a
9:1389200188479 ID:414d5120514d5f76385f62696c626f20ff30cd522000800b
-------------------------------------------------------------------------------
Receiving....
Selector is : JMSTimestamp BETWEEN 1389200181277 AND 1389200186078
--------------------------------
1389200181277 ID:414d5120514d5f76385f62696c626f20ff30cd5220008005
--------------------------------
1389200182477 ID:414d5120514d5f76385f62696c626f20ff30cd5220008006
--------------------------------
1389200183677 ID:414d5120514d5f76385f62696c626f20ff30cd5220008007
--------------------------------
1389200184877 ID:414d5120514d5f76385f62696c626f20ff30cd5220008008
--------------------------------
1389200186078 ID:414d5120514d5f76385f62696c626f20ff30cd5220008009
--------------------------------

Calanais
- 1,541
- 9
- 10
0
Thank you Calanais for your response. Yes I use MQJexplorer and I can see that the message is sent and committed. So of course the dates are in Timestamp format, ie a Long returned by getTime() function.

Gorgui Ndong
- 153
- 1
- 10