You need to sign in to do that
Don't have an account?
Sean Gibson
Formula Field - changing order of a date/time value converted to a text field
Hi,
I am fairly new to salesforce as an admin, I am looking for a bit of advice around a formula field,
I have a field which converts a date/time value and takes only the date bu converting it to text, however the format of the date is YYYY-MM-DD, I am wondering if there is any way to change the order of the date field so it shows DD-MM-YYYY
My formula is below;
Name&" - "&ProductCode__r.Name&" - "&LEFT(TEXT(Outward_Date__c),FIND(" ",TEXT(Outward_Date__c))-1)&" - "& From__r.Name&" >> "&To__r.Name
Appreciate any help I can be offered,
Thank you,
I am fairly new to salesforce as an admin, I am looking for a bit of advice around a formula field,
I have a field which converts a date/time value and takes only the date bu converting it to text, however the format of the date is YYYY-MM-DD, I am wondering if there is any way to change the order of the date field so it shows DD-MM-YYYY
My formula is below;
Name&" - "&ProductCode__r.Name&" - "&LEFT(TEXT(Outward_Date__c),FIND(" ",TEXT(Outward_Date__c))-1)&" - "& From__r.Name&" >> "&To__r.Name
Appreciate any help I can be offered,
Thank you,
I looked at your issue and found the solution. I tested it at my org and it worked.
You have one formula field-
Date field will be in DD-MM-YYYY format by this solution.
Replace Your code with this->
Name&" - "&ProductCode__r.Name&" - " & Right(TEXT(Outward_Date__c),2) &"-"& RIGHT(LEFT(TEXT(Outward_Date__c),7),2) &"-"& LEFT(TEXT(Outward_Date__c),4) &" - "& From__r.Name&" >> "&To__r.Name
This piece of formula will write the date in DD-MM-YYYY format.
Right(TEXT(Outward_Date__c),2) &"-"& RIGHT(LEFT(TEXT(Outward_Date__c),7),2) &"-"& LEFT(TEXT(Outward_Date__c),4)
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Ajay Dubedi
www.ajaydubedi.com