|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
time format issue |
« View previous topic :: View next topic » |
Author |
Message
|
EAI Developer |
Posted: Wed Aug 09, 2006 3:44 am Post subject: time format issue |
|
|
 Centurion
Joined: 30 Nov 2005 Posts: 101 Location: US
|
Hi All,
I need small help in doing my scenario. I am getting a date format like "08/08/2006 10:48:14 " from DB2 database.I need to convert it like
"2006-08-02T08:03:00-05:00" . I tried using cast function but have no luck in that.I also tried to set the datetimeformat property of message set as i am using a message set in my flow.So can any 1 pls tel me is there any function to convert the date as per my requriment.I can do this using substring and append operations,but i need much gud code.so please help me in this ..I already searched in the forum for this type of issue but i didn't get any useful info.
Thanx,
EAI Developer. |
|
Back to top |
|
 |
kimbert |
Posted: Wed Aug 09, 2006 6:14 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
The options which you mentioned are the only ones I can think of. The best way to get help is to tell us what went wrong with each approach. Make sure you tell us which version and CSD level you are on - it makes a difference. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Aug 09, 2006 12:51 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
If in 6.0 look up the CAST function with the FORMAT addition.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
EAI Developer |
Posted: Thu Aug 10, 2006 2:50 am Post subject: |
|
|
 Centurion
Joined: 30 Nov 2005 Posts: 101 Location: US
|
Hi,
Thnx for the replies.I working on MB v6.0 with fix pack1 installed.I tried using CAST funtion but the problem i am getting is like this ..
If i give the date format as '01-02-03'(where 01=day,02=month and 03=year) and I mentioned the format option in the CAST function as 'yyyyMMdd' then the result will be '2001-02-03',which is not in real.
got me?If yes ,please help me.
Thnx in advance,
EAI Developer. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Aug 10, 2006 3:01 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Use Format string: 'dd-MM-yy' (don't remember if you need capital yy if no century present, look up the cast information on date formats...)
I would have thought this one obvious....
You cast from char to date. Now if you need to display the date in a special format you will have to do the same casting from date to char...
Enjoy  _________________ MQ & Broker admin |
|
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
|
|
|
|