[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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<>)
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|