Format Expressions

LeadExec allows you to apply custom or standard formatting to information being displayed as well as being sent from the system.

Below are examples of standard and custom formatting: Back to Documentation

Standard Date Formats

Format Name Result
d Short date pattern. 6/15/2009 1:45:30 PM -> 6/15/2009
D Long date pattern. 6/15/2009 1:45:30 PM -> Monday, June 15, 2009
f Full date/time pattern (short time). 6/15/2009 1:45:30 PM -> Monday, June 15, 2009 1:45 PM
F Full date/time pattern (long time). 6/15/2009 1:45:30 PM -> Monday, June 15, 2009 1:45:30 PM
g General date/time pattern (short time). 6/15/2009 1:45:30 PM -> 6/15/2009 1:45 PM
G General date/time pattern (long time). 6/15/2009 1:45:30 PM -> 6/15/2009 1:45:30 PM
M or m Month/day pattern. 6/15/2009 1:45:30 PM -> June 15
O or o Round-trip date/time pattern. 6/15/2009 1:45:30 PM -> 2009-06-15T13:45:30.0000000
R or r RFC1123 pattern. 6/15/2009 1:45:30 PM -> Mon, 15 Jun 2009 13:45:30 GMT
s Sortable date/time pattern. 6/15/2009 1:45:30 PM -> 2009-06-15T13:45:30
t Short time pattern. 6/15/2009 1:45:30 PM -> 1:45 PM
T Long time pattern. 6/15/2009 1:45:30 PM -> 1:45:30 PM
u Universal sortable date/time pattern. 6/15/2009 1:45:30 PM -> 2009-06-15 13:45:30Z
U Universal full date/time pattern. 6/15/2009 1:45:30 PM -> Monday, June 15, 2009 8:45:30 PM
Y or y Year month pattern. 6/15/2009 1:45:30 PM -> June 2009

Custom Date Formats

Format Name Result
d The day of the month, from 1 through 31. 6/1/2009 1:45:30.617455 PM -> 1
dd The day of the month, from 01 through 31. 6/1/2009 1:45:30.617455 PM -> 01
ddd The abbreviated name of the day of the week. 6/15/2009 1:45:30.617455 PM -> Mon
dddd The full name of the day of the week. 6/15/2009 1:45:30.617455 PM -> Monday
f The tenths of a second in a date and time value. 6/15/2009 1:45:30.617455 PM -> 6
ff The hundredths of a second in a date and time value. 6/15/2009 1:45:30.617455 PM -> 61
fff The milliseconds in a date and time value. 6/15/2009 1:45:30.617455 PM -> 617
ffff The ten thousandths of a second in a date and time value. 6/15/2009 1:45:30.617455 PM -> 6174
fffff The hundred thousandths of a second in a date and time value. 6/15/2009 1:45:30.617455 PM -> 617455
ffffff The millionths of a second in a date and time value. 6/15/2009 1:45:30.617455 PM -> 6174550
fffffff The ten millionths of a second in a date and time value. 6/15/2009 1:45:30.617455 PM -> 6174550
F If non-zero, the tenths of a second in a date and time value. 6/15/2009 1:45:30.617455 PM -> 6
FF If non-zero, the hundredths of a second in a date and time value. 6/15/2009 1:45:30.617455 PM -> 61
FFF If non-zero, the milliseconds in a date and time value. 6/15/2009 1:45:30.617455 PM -> 617
FFFF If non-zero, the ten thousandths of a second in a date and time value. 6/15/2009 1:45:30.617455 PM -> 6174
FFFFF If non-zero, the hundred thousandths of a second in a date and time value. 6/15/2009 1:45:30.617455 PM -> 61745
FFFFFF If non-zero, the millionths of a second in a date and time value. 6/15/2009 1:45:30.617455 PM -> 617455
FFFFFFF If non-zero, the ten millionths of a second in a date and time value. 6/15/2009 1:45:30.617455 PM -> 617455
g or gg The period or era. 6/15/2009 1:45:30.617455 PM -> A.D. or A.D.
h The hour, using a 12-hour clock from 1 to 12. 6/15/2009 1:45:30.617455 PM -> 1
hh The hour, using a 12-hour clock from 01 to 12. 6/15/2009 1:45:30.617455 PM -> 01
H The hour, using a 24-hour clock from 0 to 23. 6/15/2009 1:45:30.617455 PM -> 13
HH The hour, using a 24-hour clock from 00 to 23. 6/15/2009 1:45:30.617455 PM -> 13
m The minute, from 0 through 59. 6/15/2009 1:45:30.617455 PM -> 45
mm The minute, from 00 through 59. 6/15/2009 1:45:30.617455 PM -> 45
M The month, from 1 through 12. 6/15/2009 1:45:30.617455 PM -> 6
MM The month, from 01 through 12. 6/15/2009 1:45:30.617455 PM -> 06
MMM The abbreviated name of the month. 6/15/2009 1:45:30.617455 PM -> Jun
MMMM The full name of the month. 6/15/2009 1:45:30.617455 PM -> June
s The second, from 0 through 59. 6/15/2009 1:45:30.617455 PM -> 30
ss The second, from 00 through 59. 6/15/2009 1:45:30.617455 PM -> 30
t The first character of the AM/PM designator. 6/15/2009 1:45:30.617455 PM -> P
tt The AM/PM designator. 6/15/2009 1:45:30.617455 PM -> PM
y The year, from 0 to 99. 6/15/2009 1:45:30.617455 PM -> 9
yy The year, from 00 to 99. 6/15/2009 1:45:30.617455 PM -> 09
yyy The year, with a minimum of three digits. 6/15/2009 1:45:30.617455 PM -> 2009
yyyy The year as a four-digit number. 6/15/2009 1:45:30.617455 PM -> 2009
yyyyy The year as a five-digit number. 6/15/2009 1:45:30.617455 PM -> 02009
z Hours offset from UTC, with no leading zeros. 6/15/2009 1:45:30.617455 PM -> -7
zz Hours offset from UTC, with a leading zero for a single-digit value. 6/15/2009 1:45:30.617455 PM -> -07
zzz Hours and minutes offset from UTC. 6/15/2009 1:45:30.617455 PM -> -07:00
: The time separator. 6/15/2009 1:45:30.617455 PM -> :

Standard Numeric Formats

Format Name Result
C or c A currency value. 123.456 -> $123.46
D or d Integer digits with optional negative sign. 123 -> 123
E or e Exponential notation. 123.45613151515651 -> 1.234561E+002
F or f Integral and decimal digits with optional negative sign. 123.456 -> 123.46
G or g The most compact of either fixed-point or scientific notation. 123.456 -> 123.456
N or n Integral and decimal digits, group separators, and a decimal separator with optional negative sign. 123.456 -> 123.46
P or p Number multiplied by 100 and displayed with a percent symbol. .397 -> 39.70 %
R or r A string that can round-trip to an identical number. 123.456 -> 123.456
X or x A hexadecimal string. 255 -> 7B