Skip to main content
deleted 21 characters in body
Source Link

Need help in Date Validation Rule and formula

I have a date field (Last_Order_Date__c), in which I am defaulting the value of date to 6 months ahead from today's date.

Default Value for Above Date Field with formula

DATE( 
YEAR(TODAY()) + IF(MONTH(TODAY()) > 6, 1, 0), 
MOD(MONTH(TODAY()) + 6, 12), 
DAY(TODAY()) 
)

Right now it is defaulting the value correctly. Suppose today is 10/29/2016 .It is defaultly setting to this value 4/29/2017. My first question: Is this formula is correct for making ahead of 6months from today'sdefaulting the date? value to the date which is 6months ahead. Will it also consider Months having 30 and 31st automatically?

I have one more doubt I have one validation rule if we keep less than 6 months date (Last_Order_Date__c )then FYI I am throwing angetting below error message "Last Order Date should be greater than 6 Months from Today."

Validation Rule

IF(Last_Order_Date__c <=(DATE( 
   YEAR(TODAY()) + IF(MONTH(TODAY()) > 6, 1, 0), 
   MOD(MONTH(TODAY()) + 6, 12), 
   DAY(TODAY()))), TRUE, FALSE)

As I am defaulting the value to 6 months ahead .The value of theif today's date field is 410/2931/2017. While Saving2016 and I am using the record it is throwing errorabove formula for 4/29/2017 thisdefault date also.I need it should not throw error if it is 4/29/2017.If it is less than then 4/29/2017 then only throw an error.What Changes should I mention in Validation rule so that it should work fine.?

enter image description here

Need help in Date Validation Rule and formula

I have a date field (Last_Order_Date__c), in which I am defaulting the value of date to 6 months ahead from today's date.

Default Value for Above Date Field with formula

DATE( 
YEAR(TODAY()) + IF(MONTH(TODAY()) > 6, 1, 0), 
MOD(MONTH(TODAY()) + 6, 12), 
DAY(TODAY()) 
)

Right now it is defaulting the value correctly. Suppose today is 10/29/2016 .It is defaultly setting to this value 4/29/2017. My first question Is this formula is correct for making ahead of 6months from today's date? Will it consider Months having 30 and 31st automatically?

I have one more doubt I have one validation rule if we keep less than 6 months date (Last_Order_Date__c )then I am throwing an error message "Last Order Date should be greater than 6 Months from Today."

Validation Rule

IF(Last_Order_Date__c <=(DATE( 
   YEAR(TODAY()) + IF(MONTH(TODAY()) > 6, 1, 0), 
   MOD(MONTH(TODAY()) + 6, 12), 
   DAY(TODAY()))), TRUE, FALSE)

As I am defaulting the value to 6 months ahead .The value of the date field is 4/29/2017. While Saving the record it is throwing error for 4/29/2017 this date also.I need it should not throw error if it is 4/29/2017.If it is less than then 4/29/2017 then only throw an error.What Changes should I mention in Validation rule so that it should work fine.?

Need help in Date formula

I have a date field (Last_Order_Date__c), in which I am defaulting the value of date to 6 months ahead from today's date.

Default Value for Above Date Field with formula

DATE( 
YEAR(TODAY()) + IF(MONTH(TODAY()) > 6, 1, 0), 
MOD(MONTH(TODAY()) + 6, 12), 
DAY(TODAY()) 
)

Right now it is defaulting the value correctly. Suppose today is 10/29/2016 .It is defaultly setting to this value 4/29/2017. My first question: Is this formula correct for defaulting the date value to the date which is 6months ahead. Will it also consider Months having 31st automatically? FYI I am getting below error if today's date is 10/31/2016 and I am using the above formula for default date.

enter image description here

deleted 21 characters in body
Source Link

I have a date field (Last_Order_Date__c), which is Date field, in which I am defaulting the value of date to 6 months ahead from today's date.

Default Value for Above Date Field with formula

DATE( 
YEAR(TODAY()) + IF(MONTH(TODAY()) > 6, 1, 0), 
MOD(MONTH(TODAY()) + 6, 12), 
DAY(TODAY()) 
)

Right now it is defaulting the value correctly. Suppose today is 10/29/2016 .It is defaultly setting to this value 4/29/2017. My first question Is this formula is correct for making ahead of 6months from today's date? Will it consider Months having 30 and 31st automatically?

I have one more doubt I have one validation rule if we keep less than 6 months date (Last_Order_Date__c )then I am throwing an error message "Last Order Date should be greater than 6 Months from Today."

Validation Rule

IF(Last_Order_Date__c <=(DATE( 
   YEAR(TODAY()) + IF(MONTH(TODAY()) > 6, 1, 0), 
   MOD(MONTH(TODAY()) + 6, 12), 
   DAY(TODAY()))), TRUE, FALSE)

As I am defaulting the value to 6 months ahead .The value of the date field is 4/29/2017. While Saving the record it is throwing error for 4/29/2017 this date also.I need it should not throw error if it is 4/29/2017.If it is less than then 4/29/2017 then only throw an error.What Changes should I mention in Validation rule so that it should work fine.?

I have a date field (Last_Order_Date__c), which is Date field, in which I am defaulting the value of date to 6 months ahead from today's date.

Default Value for Above Date Field with formula

DATE( 
YEAR(TODAY()) + IF(MONTH(TODAY()) > 6, 1, 0), 
MOD(MONTH(TODAY()) + 6, 12), 
DAY(TODAY()) 
)

Right now it is defaulting the value correctly. Suppose today is 10/29/2016 .It is defaultly setting to this value 4/29/2017. My first question Is this formula is correct for making ahead of 6months from today's date? Will it consider Months having 30 and 31st automatically?

I have one more doubt I have one validation rule if we keep less than 6 months date (Last_Order_Date__c )then I am throwing an error message "Last Order Date should be greater than 6 Months from Today."

Validation Rule

IF(Last_Order_Date__c <=(DATE( 
   YEAR(TODAY()) + IF(MONTH(TODAY()) > 6, 1, 0), 
   MOD(MONTH(TODAY()) + 6, 12), 
   DAY(TODAY()))), TRUE, FALSE)

As I am defaulting the value to 6 months ahead .The value of the date field is 4/29/2017. While Saving the record it is throwing error for 4/29/2017 this date also.I need it should not throw error if it is 4/29/2017.If it is less than then 4/29/2017 then only throw an error.What Changes should I mention in Validation rule so that it should work fine.?

I have a date field (Last_Order_Date__c), in which I am defaulting the value of date to 6 months ahead from today's date.

Default Value for Above Date Field with formula

DATE( 
YEAR(TODAY()) + IF(MONTH(TODAY()) > 6, 1, 0), 
MOD(MONTH(TODAY()) + 6, 12), 
DAY(TODAY()) 
)

Right now it is defaulting the value correctly. Suppose today is 10/29/2016 .It is defaultly setting to this value 4/29/2017. My first question Is this formula is correct for making ahead of 6months from today's date? Will it consider Months having 30 and 31st automatically?

I have one more doubt I have one validation rule if we keep less than 6 months date (Last_Order_Date__c )then I am throwing an error message "Last Order Date should be greater than 6 Months from Today."

Validation Rule

IF(Last_Order_Date__c <=(DATE( 
   YEAR(TODAY()) + IF(MONTH(TODAY()) > 6, 1, 0), 
   MOD(MONTH(TODAY()) + 6, 12), 
   DAY(TODAY()))), TRUE, FALSE)

As I am defaulting the value to 6 months ahead .The value of the date field is 4/29/2017. While Saving the record it is throwing error for 4/29/2017 this date also.I need it should not throw error if it is 4/29/2017.If it is less than then 4/29/2017 then only throw an error.What Changes should I mention in Validation rule so that it should work fine.?

added 78 characters in body
Source Link

I have a date field (Last_Order_Date__c), which is Date field, in which I am defaulting the value of date to 6 months ahead from today's date.

Default Value for Above Date Field with formula

DATE( 
YEAR(TODAY()) + IF(MONTH(TODAY()) > 6, 1, 0), 
MOD(MONTH(TODAY()) + 6, 12), 
DAY(TODAY()) 
)

Right now it is defaulting the value correctly. Suppose today is 10/29/2016 .It is defaultly setting to this value 4/29/2017. My first question Is this formula is correct for making ahead of 6months from today's date? Will it consider Months having 30 and 31st automatically?

I have one more doubt I have one validation rule if we keep less than 6 months date (Last_Order_Date__c )then I am throwing an error message "Last Order Date should be greater than 6 Months from Today."

Validation Rule

IF(Last_Order_Date__c <=(DATE( 
   YEAR(TODAY()) + IF(MONTH(TODAY()) > 6, 1, 0), 
   MOD(MONTH(TODAY()) + 6, 12), 
   DAY(TODAY()))), TRUE, FALSE)

As I am defaulting the value to 6 months ahead .The value of the date field is 4/29/2017. While Saving the record it is throwing error for 4/29/2017 this date also.I need it should not throw error if it is 4/29/2017.If it is less than then 4/29/2017 then only throw an error.What Changes should I mention in Validation rule so that it should work fine.?

I have a date field (Last_Order_Date__c), which is Date field, in which I am defaulting the value of date to 6 months ahead from today's date.

Default Value for Above Date Field with formula

DATE( 
YEAR(TODAY()) + IF(MONTH(TODAY()) > 6, 1, 0), 
MOD(MONTH(TODAY()) + 6, 12), 
DAY(TODAY()) 
)

Right now it is defaulting the value correctly. Suppose today is 10/29/2016 .It is defaultly setting to this value 4/29/2017. My first question Is this formula is correct for making ahead of 6months from today's date? Will it consider Months having 30 and 31st automatically?

I have one more doubt I have one validation rule if we keep less than 6 months date (Last_Order_Date__c )then I am throwing an error message "Last Order Date should be greater than 6 Months from Today."

Validation Rule

IF(Last_Order_Date__c <=(DATE( 
   YEAR(TODAY()) + IF(MONTH(TODAY()) > 6, 1, 0), 
   MOD(MONTH(TODAY()) + 6, 12), 
   DAY(TODAY()))), TRUE, FALSE)

As I am defaulting the value to 6 months ahead .The value of the date field is 4/29/2017. While Saving the record it is throwing error for 4/29/2017 this date also.I need it should not throw error if it is 4/29/2017.If it is less than then 4/29/2017 then only throw an error.

I have a date field (Last_Order_Date__c), which is Date field, in which I am defaulting the value of date to 6 months ahead from today's date.

Default Value for Above Date Field with formula

DATE( 
YEAR(TODAY()) + IF(MONTH(TODAY()) > 6, 1, 0), 
MOD(MONTH(TODAY()) + 6, 12), 
DAY(TODAY()) 
)

Right now it is defaulting the value correctly. Suppose today is 10/29/2016 .It is defaultly setting to this value 4/29/2017. My first question Is this formula is correct for making ahead of 6months from today's date? Will it consider Months having 30 and 31st automatically?

I have one more doubt I have one validation rule if we keep less than 6 months date (Last_Order_Date__c )then I am throwing an error message "Last Order Date should be greater than 6 Months from Today."

Validation Rule

IF(Last_Order_Date__c <=(DATE( 
   YEAR(TODAY()) + IF(MONTH(TODAY()) > 6, 1, 0), 
   MOD(MONTH(TODAY()) + 6, 12), 
   DAY(TODAY()))), TRUE, FALSE)

As I am defaulting the value to 6 months ahead .The value of the date field is 4/29/2017. While Saving the record it is throwing error for 4/29/2017 this date also.I need it should not throw error if it is 4/29/2017.If it is less than then 4/29/2017 then only throw an error.What Changes should I mention in Validation rule so that it should work fine.?

edited tags
Link
Loading
remove redundant tags
Link
Dave Humm
  • 5.1k
  • 5
  • 25
  • 38
Loading
Source Link
Loading