|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
xs:dateTime to xs:date |
« View previous topic :: View next topic » |
Author |
Message
|
giorginus80 |
Posted: Fri May 22, 2009 5:39 am Post subject: xs:dateTime to xs:date |
|
|
 Centurion
Joined: 08 Jul 2008 Posts: 124 Location: Rome, Italy
|
Hi,
is it possible to convert xs:dateTime to xs:date in a map? Thanks in advance |
|
Back to top |
|
 |
mqjeff |
Posted: Fri May 22, 2009 5:41 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
|
Back to top |
|
 |
giorginus80 |
Posted: Fri May 22, 2009 5:45 am Post subject: |
|
|
 Centurion
Joined: 08 Jul 2008 Posts: 124 Location: Rome, Italy
|
mqjeff wrote: |
It should be. |
How? I did something like
Code: |
xs:date( fn:concat( esql:lpad( xs:string( fn:year-from-dateTime( xs:dateTime($source/io:sir/io:header/io:dataInvio) ) ), '0', 4 ), '-', esql:lpad( xs:string( fn:month-from-dateTime( xs:dateTime($source/io:sir/io:header/io:dataInvio) ) ), '0', 2 ), '-', esql:lpad( xs:string( fn:day-from-dateTime( xs:dateTime($source/io:sir/io:header/io:dataInvio) ) ), '0', 2 ) ) )
|
but I think there is another way....? |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri May 22, 2009 10:17 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Broker version and OS ?
Have you looked at the Date functions and CAST functions?
 _________________ MQ & Broker admin |
|
Back to top |
|
 |
giorginus80 |
Posted: Mon May 25, 2009 12:28 am Post subject: |
|
|
 Centurion
Joined: 08 Jul 2008 Posts: 124 Location: Rome, Italy
|
fjb_saper wrote: |
Broker version and OS ?
Have you looked at the Date functions and CAST functions?
 |
MB 6.1.0.3
OS: Aix 5.3 (level 9)
I tried to cast, but I have a cast exception. |
|
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
|
|
|
|