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 » CASTING a string into DATE and TIME

Post new topic  Reply to topic
 CASTING a string into DATE and TIME « View previous topic :: View next topic » 
Author Message
MQDummy
PostPosted: Sun Jun 23, 2002 5:20 pm    Post subject: CASTING a string into DATE and TIME Reply with quote

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
View user's profile Send private message
kirani
PostPosted: Sun Jun 23, 2002 7:12 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
tchagan
PostPosted: Mon Jun 24, 2002 4:24 am    Post subject: When will... Reply with quote

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
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 » CASTING a string into DATE and TIME
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.