+ Start a Discussion
VDid.ax1020VDid.ax1020 

Converting a date field in a different format

Hi All,

 

I have a date field, lets say its Picked_Date__c, I am trying to convert this date into the format

 

YYYYMMDD

 

How do I do this via formula? I have the below text formula but for some reason I cannot get the Month and Day to format into 2 digits instead of 1, this is important. Please help.

 

Thanks,

V

 

Text(Year(SEPA_DD_Mandate_Signature_Date__c))+
Text(Month( SEPA_DD_Mandate_Signature_Date__c))+
Text(Day(SEPA_DD_Mandate_Signature_Date__c))

Navatar_DbSupNavatar_DbSup

Hi,

 

Try the below formula

 

TEXT(YEAR( chkdate__c))  + IF(LEN(TEXT( MONTH(chkdate__c  )))==1, '0'+TEXT( MONTH(chkdate__c  )), TEXT( MONTH(chkdate__c  ))) + IF(LEN(TEXT( DAY(chkdate__c  )))==1, '0'+TEXT( DAY(chkdate__c  )), TEXT( DAY(chkdate__c  )))

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.