Vous êtes sur la page 1sur 2

Date Formatting Strings

Supported Mathematical Operators


: Time separator
REPORTSAFE
+ Addition or string concatenation
- / Date separator
*
Subtraction
Multiplication d Day without leading zero (1-31)
CALCULATION ENGINE
/ Division dd Day with leading zero (01-31) QUICK REFERENCE
\ Integer division ddd Day as abbreviation (Sun-Sat)
% Modulo dddd Day as full name (Sunday – Saturday)
^ Exponentiation w Day of week number (1=Sunday)
ww Week of year (1-54)
m Month without leading zero (1-12)
Supported String Operators
mm Month with leading zero (01-12)
& String concatenation mmm Month as abbreviation (Jan-Dec)
mmmm Month name (January-December)
The Standard for Product Integrity
Supported Comparison Operators q Quarter of year (1-4)
= Equality yy Year as two digits (00-99)
<> Inequality yyyy Year as four digits (100-9999)
< Less than h Hour without leading zero (0-23)
<= Less than or equal to hh Hour with leading zero (00-23)
> Greater than n Minute without leading zero (0-59)
>= Greater than or equal to nn Minute with leading zero (00-59)
~= Wildcard matching (LIKE) s Second without leading zero (0-59)
ss Second with leading zero (00-59)
AM/PM Display AM or PM with 12 hour time
Supported Logical Operators
am/pm Same as above except lower case
! Logical NOT A/P Display A and P with 12 hour time
&& Logical AND a/p Same as above except lower case
|| Logical OR Predefined date and time formats:
^^ Logical XOR General Date
Long Date Long Time
Operator Precedence Medium Date Medium Time
Arithmetic operators: (in order below) Short Date Short Time
Exponentiation: (^)
Multiplication and division: (*, /) Pattern Matching
Integer division: (\) ? Any single character
Modulo: (%) * Zero or more characters
Addition and subtraction: (+, -) # Any single digit (0-9)
String concatenation: (&) [charlist] Any single character in charlist
Comparisons: (=, <>, <, <=, >, >=, ~=) [!charlist] Any single character not in charlist
Logical operators: (in order below)
NOT (!)
AND (&&)
OR (||)
XOR (^^) 2008-12-04
Processing Functions LCase() Lower case Month([format]) Return month
UCase() Upper case MonthName(bool) Return month name
Eval() Evaluate a string as an expression
Trim() Trim blanks Day([format]) Return day
[expression] Same as above
LTrim() Trim blanks from left Year([format]) Return year
IIF Function RTrim() Trim blanks from right Hour([format]) Return hour
IIF(condition, true-part, false-part) StrRev() Reverse string Minute([format]) Return minute
Math Functions Word(start [,delimiter] [,count]) Return words Second([format]) Return second
WordCount([delimiter]) Count of words Time([format]) Return time
Abs() Absolute value
Capitalize() Capitalize 1st word in string Date([format]) Return date
Atn() Arctangent
AscAt(position) ASCII code at position LastDayOfMonth() Last day of month
Cos() Cosine
SQLStr() Double-up single quotes FirstDayOfMonth() First day of month
Exp() Base of natural logarithm
SQLBit() Return 1 or 0 for Boolean FormatDateTime([format]) Return formatted date
Fix() Integer portion of a number
SQLDate(type) Return SQL date Static Date Functions (Date.)
Int() Integer
IsDate() True if date
Log() Natural logarithm Now([format]) Return current date/time
IsNotDate() True if not date
Sgn() Sign of a number WeekdayName(day [,bool]) Return weekday name
IsNumeric() True if numeric
Sin() Sine MonthName(month [,bool]) Return month name
IsNotNumeric() True if not numeric
Sqr() Square root DaysInMonth(date) Days in month
IsBlank() True if blank
Tan() Tangent DaysInYear(year) Days in year
IsNotBlank() True if non-blank
Val() Numeric value of a string IsLeapYear(year) True if leap year
IsLike(wildcard) True if matches wildcard
Static Math Functions (Math.) IsNotLike(wildcard) True if doesn’t match wildcard Special Ascend Functions (Asi.)

E() e (natural logarithmic base) 2.71828 IsFilter() True if string contains wildcards DocURL(lprkey [,page-no]) URL for Document
PI() pi (Archimedes’ constant) 3.14159 IsNotFilter() True if does not contain wildcards DocURLNF(lprkey [,page-no]) Same (no frames)
Number Formatting StrToHTML() Encodes string for HTML DocURLRestore(lprKey) Restore a Document
HTMLToStr() Encodes string text from HTML DocURLEmail(lprKey) Email a Document
FormatCurrency([decimalPlaces] [,incLeadingZero] [,useParenthesis]
StrToURL() Encodes string for URL DocURLExtract(lprKey) Extract a Document
[,groupDigits])
ToSQLFilter() Convert wildcards to SQL format DocURLPrintServer(lprKey) Print Doc on Server
FormatNumber([decimalPlaces] [,incLeadingZero] [,useParenthesis]
FromSQLFilter() Convert wildcards from SQL format DocURLPrintLocal(lprKey) Print Doc locally
[,groupDigits])
NextXMLTag(tag, start) Starting pos of next tag DocURLPrintPDF(lprKey) Print Doc as PDF
FormatPercent([decimalPlaces] [,incLeadingZero] [,useParenthesis]
XMLTagValue(tag [,start]) Inner text of tag DocURLDownload(lprKey) Download Document
[,groupDigits])
XMLTagAttrib(tag, attrib [,start]) Value of attrib DocURLForward(lprKey) Fwd/Reassign Doc
Format(format)
Static String Functions (String.) DocURLArcDate(lprKey) Change Archive date
Static Number Functions (Number.) DocURLExpDate(lprKey) Change Expiration date
Cr() Carriage return
Min(value1, value2) Smaller of two values DocURLNotes(lprKey) Notes dialog (proposed)
Lf() Line feed
Max(value1, value2) Larger of two values DocURLDelete(lprKey) Delete Doc (proposed)
CrLf() Carriage return/Line feed
Rnd() Random number between 0 & 1 DocUpdate (field, value, rptid) Return SQL to change Doc
Tab() Tab
Randomize([value]) Seed random number generator WFStart(wfname [,lprKey]) Start WF
Chr(ascii-code) Character
Timer() Current Timer() value WFStartApp (wfname, cat, vfile) Start WF & return to App
FormFeed() Form Feed
String Functions WFUpload(wfname) Upload File (proposed)
Space(number [,character]) Spaces
WFFunc(wfname [,arg1]…) Start WF & return value
Left(len) Left part of string Now([format]) Date/Time
AppURL(cat, vfile) Start Portal App
Right(len) Right part of string Asc(character) ASCII code for character
Mid(start [,len]) Middle part of string Date Functions
SubStr(start [,len]) Same as Mid() function
DateAdd(part, value [,format]) Add dates
Length() Length of string
DateDiff(part, date [,format]) Date difference
Instr(start, string) Position of substring
DatePart(part) Return date part
InstrRev(string [,start]) Position of substring (reverse)
Weekday([format]) Return weekday
Replace(oldstring, newstring) Replace substring
WeekdayName(bool) Return weekday name