+ Start a Discussion
Chance AllredChance Allred 

My Date/Time Formula isn't populating

We use Dates and then Time Windows for our company vs actual times, however for an integration I need to give it a Date/Time value to work properly. I'm creating two Date/Time formulas to hold a Start Date/Time and End Date/Time that it needs.

For whatever reason, my formula isn't working. I have no syntax errors and the formula saves fine, but no values are populating. I thought it was maybe resorting to the NULL value, but I added another Date/Time value rather than null, and it still isn't populating.

Any help is appreciated.
IF(TEXT(Appointment_Time__c)="9-1 (Morning)",
DATETIMEVALUE(
TEXT(YEAR(Appointment_Date__c))
+"-"+
TEXT(MONTH(Appointment_Date__c))
+"-"+
TEXT(DAY(Appointment_Date__c))
+" "+
"9:00:00"
),
IF(TEXT(Appointment_Time__c)="1-5 (Afternoon)",
DATETIMEVALUE(
TEXT(YEAR(Appointment_Date__c))
+"-"+
TEXT(MONTH(Appointment_Date__c))
+"-"+
TEXT(DAY(Appointment_Date__c))
+" "+
"13:00:00"
),
IF(TEXT(Appointment_Time__c)="5-7 (Evening)",
DATETIMEVALUE(
TEXT(YEAR(Appointment_Date__c))
+"-"+
TEXT(MONTH(Appointment_Date__c))
+"-"+
TEXT(DAY(Appointment_Date__c))
+" "+
"17:00:00"
), NULL)))

 
ravi soniravi soni
hi Chance,
I used the same Formula and It's working fine.
IF(TEXT(DeliveryInstallationStatus__c)="9-1 (Morning)",
DATETIMEVALUE(
TEXT(YEAR(CloseDate	))	
+"-"+
TEXT(MONTH(CloseDate	))
+"-"+
TEXT(DAY(CloseDate	))	
+" "+
"9:00:00"
),
IF(TEXT(DeliveryInstallationStatus__c)="1-5 (Afternoon)",
DATETIMEVALUE(
TEXT(YEAR(CloseDate))
+"-"+
TEXT(MONTH(CloseDate))
+"-"+
TEXT(DAY(CloseDate))
+" "+
"13:00:00"
),
IF(TEXT(DeliveryInstallationStatus__c)="5-7 (Evening)",
DATETIMEVALUE(
TEXT(YEAR(CloseDate))
+"-"+
TEXT(MONTH(CloseDate))
+"-"+
TEXT(DAY(CloseDate))
+" "+
"17:00:00"
), NULL)))
Please make sure that your Formula is Active. 
Let me know if it works and marking it as best.
Thank  You
Chance AllredChance Allred
Hi Veer,

I'm using a field formula that is active by default. The object is active though if that's what you meant.

The formula still isn't populating for me though.