function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Hadeel MamdouhHadeel Mamdouh 

ISBLANK formula if one field is blank to use another field

Hello,

I have a date field (Created Date) included in a serial number, I wrote a formula for it to be"18" instead of 2018 and "07" for July, for example. Now I want to change this formula to use the date field "Old created Date" instead of Created Date, but if it's blank it should continue using the Created Date field.
The current formula is:

RIGHT ( Text(YEAR(Datevalue(CreatedDate))) , 2 )+" "+CASE( 
MONTH(Datevalue(CreatedDate)), 
1, "01", 
2, "02", 
3, "03", 
4, "04", 
5, "05", 
6, "06", 
7, "07", 
8, "08", 
9, "09", 
10, "10", 
11, "11", 
12,"12", 
"")

 
Best Answer chosen by Hadeel Mamdouh
Steven NsubugaSteven Nsubuga
IF (ISBLANK(Old_CreatedDate__c),
RIGHT ( Text(YEAR(Datevalue(CreatedDate))) , 2 )+" "+CASE( 
MONTH(Datevalue(CreatedDate)), 
1, "01", 
2, "02", 
3, "03", 
4, "04", 
5, "05", 
6, "06", 
7, "07", 
8, "08", 
9, "09", 
10, "10", 
11, "11", 
12,"12", 
""), Old_CreatedDate__c)