You need to sign in to do that
Don't have an account?
Matan Alon
Lead Assignment Rule
Hi,
I'm trying to write a lead assignment rule base on lead creation time.
I wrote the following formula:
if(and (VALUE( MID( TEXT( CreatedDate ), 12, 2 ) )>=4 ,
VALUE( MID( TEXT( CreatedDate ), 12, 2 ) )<14),true,false)
sadly there something wrong with it and i dont know what...
Is there something i'm missing ?
Thanks in advance.
I'm trying to write a lead assignment rule base on lead creation time.
I wrote the following formula:
if(and (VALUE( MID( TEXT( CreatedDate ), 12, 2 ) )>=4 ,
VALUE( MID( TEXT( CreatedDate ), 12, 2 ) )<14),true,false)
sadly there something wrong with it and i dont know what...
Is there something i'm missing ?
Thanks in advance.
Can you please specify what you are trying to do, so i can help you, as the code seems to show no errors
That formula i wrote in the "Assignment Rules" section.
Check your time zone and check out this link.
http://www.salesforce.com/us/developer/docs/usefulFormulaFields/Content/formula_examples_dates.htm#getting-hms-from-datetime
To get the hour, minute, and second from a Date/Time field as a numerical value, use the following formulas where TZoffset is the difference between the user’s time zone and GMT. For hour in 24–hour format:
VALUE( MID( TEXT( date/time - TZoffset ), 12, 2 ) )
For hour in 12–hour format:
IF(
OR(
VALUE( MID( TEXT( date/time - TZoffset ), 12, 2 ) ) = 0,
VALUE( MID( TEXT( date/time - TZoffset ), 12, 2 ) ) = 12
),
12,
VALUE( MID( TEXT( date/time - TZoffset ), 12, 2 ) )
-
IF(
VALUE( MID( TEXT( date/time - TZoffset ), 12, 2 ) ) < 12,
0,
12
)
)
For minutes:
VALUE( MID( TEXT( date/time - TZoffset ), 15, 2 ) )
For seconds:
VALUE( MID( TEXT( date/time - TZoffset ), 18, 2 ) )
And, to get “AM”. or “PM” as a string, use:
IF(
VALUE( MID( TEXT( date/time - TZoffset ), 12, 2 ) ) < 12,
"AM",
"PM"
)
To return the time as a string in “HH:MM:SS A/PM” format, use the following formula:
IF(
OR(
VALUE( MID( TEXT( date/time - TZoffset ), 12, 2 ) ) = 0,
VALUE( MID( TEXT( date/time - TZoffset ), 12, 2 ) ) = 12
),
"12",
TEXT( VALUE( MID( TEXT( date/time - TZoffset ), 12, 2 ) )
-
IF(
VALUE( MID( TEXT( date/time - TZoffset ), 12, 2 ) ) < 12,
0,
12
)
)
)
& ":" &
MID( TEXT( date/time - TZoffset ), 15, 2 )
& ":" &
MID( TEXT( date/time - TZoffset ), 18, 2 )
& " " &
IF(
VALUE( MID( TEXT( date/time - TZoffset ), 12, 2 ) ) < 12,
"AM",
"PM"
)
When working with time in formula fields, you need to consider the time difference between your organization and GMT. See A Note About Date/Time and Time Zones for help understanding the time zone offset used in this formula.
As far as i understand my formula fit what you have wrote. if i want to assign all the leads that created between 4 and 14 in GMT time my formula needs to do the job, not ?