Session Relevance Date Format

The following relevance returns the source release date like this (for example): Tue, 12 Apr 2022.

How would I be able to get it to return the date in this format instead: 12/03/2022

<?relevance (name of it, source release date of it) of bes fixlets whose (name of site of it = "Enterprise Security" and source release date of it >= (first tuesday of month_and_year of current date + 1 *week)) ?>

Thank you

This should help Tip - 'format' and time/date

Thanks for the link but my relevance capabilities are very limited. I don’t even know where to start with that. Can i get a nudge in the right direction please. This is one of many failed attempts

<?relevance ( name of it, (format "{0}-{1}-{2}, {3}:{4}:{5}" + year of item 1 of it as string + month of item 1 of it as two digits as string + day_of_month of item 1 of it as two digits as string + two digit hour of item 0 of it + two digit minute of item 0 of it + two digit second of item 0 of it) of (time (universal time zone) of it, date (universal time zone) of it) of source release date of it, modification time of it ) of bes fixlets whose ( name of site of it = "Enterprise Security" and source release date of it >= (first tuesday of month_and_year of current date + 1 *week) ) ?>

Here’s an example for source release date:

(item 0 of it, (month of item 1 of it) as two digits as string & “/” & (day_of_month of item 1 of it) as two digits as string & “/” & (year of item 1 of it) as string) of (name of it, source release date of it) of bes fixlets whose (name of site of it = “Enterprise Security” and source release date of it >= (first tuesday of month_and_year of current date + 1 *week))

And here’s one taking this structure, and leveraging format:

(item 0 of it, format “{0}/{1}/{2}” + (month of item 1 of it) as two digits as string + (day_of_month of item 1 of it) as two digits as string + (year of item 1 of it) as string) of (name of it, source release date of it) of bes fixlets whose (name of site of it = “Enterprise Security” and source release date of it >= (first tuesday of month_and_year of current date + 1 *week))

Thank… this works great. I tried doing the same for modification time but it complains. I’m assuming it’s because in addition to returning a date it also returns the time. Would I just build on what you provided using hour_of_day and minute_of_day?

Correct. Since the data type for modification time is time rather than date, the month, day_of_month, and year properties aren’t available. So, there are a few options depending on what you’re trying to achieve, but if you’re primarily interested in the date that a Fixlet was modified, you can first convert the modification time to a date, then parse/format it as desired. Here’s an example:

(item 0 of it, format “{0}/{1}/{2}” + (month of item 1 of it) as two digits as string + (day_of_month of item 1 of it) as two digits as string + (year of item 1 of it) as string, format “{0}/{1}/{2}” + (month of item 2 of it) as two digits as string + (day_of_month of item 2 of it) as two digits as string + (year of item 2 of it) as string) of (name of it, source release date of it, date (universal time zone) of modification time of it) of bes fixlets whose (name of site of it = “Enterprise Security” and source release date of it >= (first tuesday of month_and_year of current date + 1 *week))

Perfect… thanks for the help Aram!!