Hi,
I need to write macro to calculate some datetime fields but I found this is strange. I can use AddDays function to the below CurrentUser.LastLogon field and this seems working correctly: {% CurrentUser.LastLogon.AddDays(90) #%}
But then when I need to use the same AddDays function to calculate another datetime field UserPasswordLastChanged it didn't work anymore. I guess this is a custom field so how do i get around it to make it work? {% CurrentUser.UserSettings.ItemsAsFields.UserPasswordLastChanged.AddDays(90) #%}
thank you Wei Wang
try this:
{% CurrentUser.UserSettings.ItemsAsFields.UserPasswordLastChanged[0].AddDays(90) #%}
Can you try doing a {% Convert.ToDateTime(CurrentUser.UserSettings.ItemsAsFields.UserPasswordLastChanged).AddDays(90) #%} ?
{% Convert.ToDateTime(CurrentUser.UserSettings.ItemsAsFields.UserPasswordLastChanged).AddDays(90) #%}
Please, sign in to be able to submit a new answer.