|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
CASTING a string into DATE and TIME |
« View previous topic :: View next topic » |
Author |
Message
|
MQDummy |
Posted: Sun Jun 23, 2002 5:20 pm Post subject: CASTING a string into DATE and TIME |
|
|
Novice
Joined: 11 Jun 2002 Posts: 23
|
Hi,
I have read strings eg. "31121998" and "083059"
being Date and Time respectively, how do i cast it into DATE and TIME?
I have tried CAST("Body"."Line"."Date" AS DATE); and
CAST("Body"."Line"."Time" AS TIME); but it fails.
Anybody know?
best regards |
|
Back to top |
|
 |
kirani |
Posted: Sun Jun 23, 2002 7:12 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Before casting string to DATE or TIME type you have to make sure your string confirms to the rule for a DATE or TIME literal/string.
You will have to construct a string in format DATE 'YYYY-MM-DD' and then use CAST to cast it to DATE data type. Similary, time stromg meeds to be in TIME 'HH:MM:SS.mss' format.
Hope this helps. _________________ 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 |
|
 |
tchagan |
Posted: Mon Jun 24, 2002 4:24 am Post subject: When will... |
|
|
 Apprentice
Joined: 10 Feb 2002 Posts: 31
|
IBM put some proper date conversion functions into this product? It is totally backward, ESQL should lose the E because it certainly isn't Enhanced it doesn't even have the standard date conversion functions of SQL!!!!  |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|