Hello,
I have a little problem with date format in the arcade expression for popup windows
Here the code :
//Connexion au Portal
var portal = Portal("portal_url")
//Récupération de la table
var table = FeatureSetByPortalItem(portal,"portal_id",1,['ID_ASFAM','LB_COD_CAGR','DT_DEB_AGR','NB_ENFANTS','TYPE_ACCUEIL','DT_FIN_AGR'])
//Filtre sur l'identifiant
var id = $feature["id_egst"]
var filtre = 'id_asfam = <a href="https://community.esri.com/t5/user/viewprofilepage/user-id/354972">@ID</a>'
var relation = Filter(table,filtre)
//Construction du texte de la fenêtre contextuelle
var popupString = ''
for (var f in relation){
popupString +='Catégorie d\'âge : ' + f.LB_COD_CAGR + TextFormatting.NewLine +
'Type d\'accueil : ' + f.TYPE_ACCUEIL + TextFormatting.NewLine +
'Nombre d\'enfant(s) autorisé(s) : ' + f.NB_ENFANTS + TextFormatting.NewLine +
'Date début : ' + f.DT_DEB_AGR + TextFormatting.NewLine +
'Date fin : ' + f.DT_FIN_AGR + TextFormatting.NewLine + TextFormatting.NewLine
}
return popupString
Here the result :

I would like as a resut : Date début : 18/03/2024 ==> i.e 'D/M/Y'
I tried to add this code in the arcade expression but it dont work at all :
var date = $feature["DT_DEB_AGR"] + " " +
Text($feature["DT_DEB_AGR"], 'D/M/Y')
So, is it possible to format the date as i want to (D/M/Y) in my Arcade expression and if yes how may i proceed please ?
* bonus question if you don't mind : how may i put my text in bold in my expression..; I mean this text : "Type d'accueil :" from the expression
'Type d\'accueil : ' + f.TYPE_ACCUEIL + TextFormatting.NewLine +
Many thanks.
Cyril