Forum Discussion
SP Calculated Date
- Aug 19, 2022
jonboylib =TEXT(DATE(YEAR([Date Purchased])+4,MONTH([Date Purchased]),DAY([Date Purchased])),"mmmm dd yyyy")
To only apply this formatting when Category = Desktop use this:
=IF(Category="Desktop",TEXT(DATE(YEAR([Date Purchased])+4,MONTH([Date Purchased]),DAY([Date Purchased])),"mmmm dd yyyy"),DATE(YEAR([Date Purchased])+4,MONTH([Date Purchased]),DAY([Date Purchased])))
Rob
Los Gallardos
Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)
jonboylib =TEXT(DATE(YEAR([Date Purchased])+4,MONTH([Date Purchased]),DAY([Date Purchased])),"mmmm dd yyyy")
To only apply this formatting when Category = Desktop use this:
=IF(Category="Desktop",TEXT(DATE(YEAR([Date Purchased])+4,MONTH([Date Purchased]),DAY([Date Purchased])),"mmmm dd yyyy"),DATE(YEAR([Date Purchased])+4,MONTH([Date Purchased]),DAY([Date Purchased])))
Rob
Los Gallardos
Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)
- jonboylibAug 19, 2022Iron Contributor
RobElliott Thanks for this.
What about my second requirement, any ideas?
2. I only want to apply this formula when a column named 'Category' is equal to 'Desktop'
- jonboylibAug 19, 2022Iron Contributor
RobElliott This does work, thanks.
However I notice that ordering this date column doesn't work. Is that because the calculation is returning a string and not a date/time?
In my calculated column settings I do have the following option selected;
The data type returned from this formula is: Date and Time
- RobElliottAug 19, 2022Silver Contributor
jonboylib yes, because you have a mix of text and dates it won't sort properly.
Rob
Los Gallardos
Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)