1

I have a formula that uses a date field that returns a date with a format DD/MM/YYYY. I need to change the format of this date to DD/MM/YY.

TEXT(DAY(ExpectedDeliveryDate__c))+"." +TEXT(MONTH(ExpectedDeliveryDate__c))+"." +TEXT(YEAR(ExpectedDeliveryDate__c))

Is it possible to do it in the formula or do I need to code ?

2 Answers 2

0

You can also do something like this RIGHT(TEXT(YEAR(NOW())), 2) to just take last 2 digits

1
  • thank you, it worked perfectly !
    – chloe
    Jan 31, 2020 at 13:25
1

You can use the Mod() to convert 4 digit year to 2 digits.

DD/MM/YY

TEXT(DAY(ExpectedDeliveryDate__c))+"/" +TEXT(MONTH(ExpectedDeliveryDate__c))+"/" +TEXT(MOD(YEAR(ExpectedDeliveryDate__c),100))

MM/DD/YY

TEXT(MONTH(ExpectedDeliveryDate__c))+"/" +TEXT(DAY(ExpectedDeliveryDate__c))+"/" +TEXT(MOD(YEAR(ExpectedDeliveryDate__c),100))
1
  • 1
    thank you, it worked !
    – chloe
    Jan 31, 2020 at 13:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.