[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Get the most recent date

Subject: Re: Get the most recent date
From: "LEGAULT, PHILLIP plegault@xxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 12 Mar 2024 20:08:16 -0000
Re:  Get the most recent date
Thanks, Marting,
this is perfect - format-dateTime(max(//records[sf:ActivityCategory_GCC__c =
'Additional Information']/sf:LastModifiedDate/xs:dateTime(.)), ...)



From: Martin Honnen martin.honnen@xxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Tuesday, March 12, 2024 3:25 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: [EXTERNAL] Re:  Get the most recent date



On 12/03/2024 19:26, LEGAULT, PHILLIP
plegault@xxxxxxxxxx<mailto:plegault@xxxxxxxxxx> wrote:
Thanks Martin,
I tried this and first Ibm missing the namespace xs,
I added xmlns:xs=http://www.w3.org/2001/XMLSchema

Then I get the error message
Error on line 1332 of process.xsl:
FORG0006: Effective boolean value is not defined for an item other than a
boolean, number,
string, or URI



I am not sure which effective boolean value that error message is about, my
suggestion to use the XPath expression

max(//records[sf:ActivityCategory_GCC__c = 'Additional
Information']/sf:LastModifiedDate/xs:dateTime(.))

to compute the latest date.

If you want format-dateTime it also use e.g.

  format-dateTime(max(//records[sf:ActivityCategory_GCC__c = 'Additional
Information']/sf:LastModifiedDate/xs:dateTime(.)), ...)

all possible in one expression without (as far as I think) running into
"effective boolean value is not defined" errors.


This is the error I get when not trying to pick one date.
XPTY0004: A sequence of more than one item is not allowed as the first
argument of
  format-dateTime() (2023-11-05T00:28:00Z, 2024-01-23T05:46:01Z, ...)


From: Martin Honnen martin.honnen@xxxxxx<mailto:martin.honnen@xxxxxx>
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx><mailto:xsl-list-service@xxxxxxxxxxx
rrytech.com>
Sent: Tuesday, March 12, 2024 12:10 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx<mailto:xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Subject: [EXTERNAL] Re:  Get the most recent date



On 12/03/2024 17:03, LEGAULT, PHILLIP
plegault@xxxxxxxxxx<mailto:plegault@xxxxxxxxxx> wrote:

I have an XML file with the following sections with date fields.

I need the latest sf:LastModifiedDate field when sf:ActivityCategory_GCC__c =
Additional Information

That sounds like

  max(//records[sf:ActivityCategory_GCC__c = 'Additional
Information']/sf:LastModifiedDate/xs:dateTime(.))

XSL-List info and archive<http://www.mulberrytech.com/xsl/xsl-list>
EasyUnsubscribe<http://lists.mulberrytech.com/unsub/xsl-list/3514465> (by
email)
XSL-List info and archive<http://www.mulberrytech.com/xsl/xsl-list>
EasyUnsubscribe<http://lists.mulberrytech.com/unsub/xsl-list/582271> (by
email)
XSL-List info and archive<http://www.mulberrytech.com/xsl/xsl-list>
EasyUnsubscribe<http://lists.mulberrytech.com/unsub/xsl-list/3514465> (by
email<>)

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.