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 » Extract seconds from XSD:DURATION datatype

Post new topic  Reply to topic
 Extract seconds from XSD:DURATION datatype « View previous topic :: View next topic » 
Author Message
ThisIsPravin
PostPosted: Mon Feb 12, 2018 6:24 pm    Post subject: Extract seconds from XSD:DURATION datatype Reply with quote

Newbie

Joined: 12 Feb 2018
Posts: 1

Version: IIB10

I am trying to extract SECONDS from the XSD:DURATION datatype. As per the documentation, it's possible using EXTRACT SECOND FROM option. But I am struggling to get this working.

I am trying like:
Code:
SET SecondsFromDuration = EXTRACT (SECOND FROM  DowntimeDuration);

But getting below error:
Quote:
RecoverableException
File:CHARACTER:/build/S1000_slot1/S1000_P/src/DataFlowEngine/ImbRdl/ImbRdlDateTimeFunctions.cpp
Line:INTEGER:908
Function:CHARACTER:ExtractFnCall::wrongTypeForExtract
Type:CHARACTER:
Name:CHARACTER:
Label:CHARACTER:
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:2476
Text:CHARACTER:wrong dalue for extract function
Insert
Type:INTEGER:5
Text:CHARACTER:.EDRSC01_Implementation_Extension_TransformToAPMMessage.Main
Insert
Type:INTEGER:5
Text:CHARACTER:45.30
Insert
Type:INTEGER:5
Text:CHARACTER:'PT1800S'

I have seen the usage of EXTRACT .. FROM like:
Code:
EXTRACT (DAYS FROM DATE '2000-02-29');
but I don't see the the option like:
Code:
EXTRACT (SECOND FROM DURATION 'PT1800S');


Any pointers are really appreciated.

Note: The typo "dalue" instead of "value" in exceptionList above is from IIB itself

Cheers,
Pravin
Back to top
View user's profile Send private message
abhi_thri
PostPosted: Tue Feb 13, 2018 12:28 am    Post subject: Reply with quote

Knight

Joined: 17 Jul 2017
Posts: 516
Location: UK

Hi...EXTRACT only supports valid ESQL datetime data types, in this case you would try converting the incoming value to an INTERVAL type and then use EXTRACT on that value.
Back to top
View user's profile Send private message
timber
PostPosted: Tue Feb 13, 2018 4:42 am    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1280

Quote:
n this case you would try converting the incoming value to an INTERVAL type and then use EXTRACT on that value.
The SOAP and XMLNSC parser can both do that for you...if you set the 'Build tree using XML Schema data types' option. It's the default for SOAP, but it is *not* the default for XMLNSC (to ensure backward compatibility with pre-v6.0 versions).
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 » Extract seconds from XSD:DURATION datatype
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.