Conversion

Top  Previous  Next

 

These functions are used to convert one type of value to another (e.g. numeric to text, text to date, etc.)

 

 

 

(Back to Function Types List)

 

 

 

Function:ANSItoOEM        
Result-type:Text        
Arguments:cText        
Description:Convert ANSI cText to OEM characters        

 

 

Function:Asc        
Result-type:Numeric        
Arguments:cCharacter        
Description:Converts a single character to its numeric (ASCII) value. Example: 'A' -> 65        

 

 

Function:B        
Result-type:Boolean        
Arguments:eExpression        
Description:Forces an 'Unknown' expression to look like a boolean expression -- it won't necessarily do conversion, it's simply used to satisfy argument type verifications where a function is used that returns an 'Unknown' type inside a function that requires a 'bBoolean' argument        

 

 

Function:C        
Result-type:Text        
Arguments:eExpression        
Description:Forces an 'Unknown' expression to look like a text expression -- it won't necessarily do conversion, it's simply used to satisfy argument type verifications where a function is used that returns an 'Unknown' type inside a function that requires a 'cText' argument        

 

 

Function:Ceiling        
Result-type:Numeric        
Arguments:nValue        
Description:Returns a value representing the smallest integer that is greater than or equal to nValue        

 

 

Function:Chr        
Result-type:Text        
Arguments:nValue        
Description:Converts a value into its character equivalent (e.g. ASCII). Example: 65 -> 'A'        

 

 

Function:Currency        
Result-type:Text        
Arguments:nValue        
Description:Converts a numeric value into currency text. Example: 3.5 -> '$3.50'        

 

 

Function:        CurrencyTextToValue        

Result-type:        Numeric        

Arguments:        cText        

Description:        Converts a text currency value to a numeric value. Example: '$3.50' -> 3.5        

 

 

Function:D        
Result-type:Date/Time        
Arguments:eExpression        
Description:Forces an 'Unknown' expression to look like a date/time expression -- it won't necessarily do conversion, it's simply used to satisfy argument type verifications where a function is used that returns an 'Unknown' type inside a function that requires a 'dDate' argument        

 

 

Function:DateToLongText        
Result-type:Text        
Arguments:dDate [, 1]        
Description:Returns the date in text form 'yyyymmdd' if the second argument is 1, otherwise formats the date using the national language specifications (locale IDs) for date/time according to the Windows settings        

 

 

Function:DateToText        
Result-type:Text        
Arguments:dDate        
Description:Converts a Date into text, in the system-specified Date Format (Program Options / Formats)        

 

 

Function:DateToTextYear        
Result-type:Text        
Arguments:dDate        
Description:Converts a Date into text, in the system-specified Date Format (Program Options / Formats), but also forces it to include the year        

 

 

Function:DecodeLongTime        
Result-type:Date/Time        
Arguments:nValue        
Description:Decodes an internal Long value into a Time/Date value.  Generally for internal use only.

 

 

Function:DMY        
Result-type:Text        
Arguments:dDate        
Description:Returns the date in the text form 'd mmm yyyy', for instance '8 July 2005'        

 

 

Function:DoW        
Result-type:Numeric        
Arguments:dDate        
Description:Returns the numeric day of the week for the dDate given (1 = Sunday, 7 = Saturday)        

 

 

Function:Floor        
Result-type:Numeric        
Arguments:nValue        
Description:Returns a value representing the largest integer that is less than or equal to nValue        

 

 

Function:FormatDateTime        
Result-type:Text        
Arguments:cFormat, dValue        
Description:Formats a date/time value to text using the cFormat specification. Details are in the FormatDateTime specifications topic.

 

 

Function:FormatFloat        
Result-type:Text        
Arguments:cFormat, nValue        
Description:Formats a numeric value to text using the cFormat specification, assuming a floating-point number. Details are in the FormatInt and FormatFloat specifications topic.

 

 

Function:FormatInt        
Result-type:Text        
Arguments:cFormat, nValue        
Description:Formats a numeric value to text using the cFormat specification, assuming an integer number. Details are in the FormatInt and FormatFloat specifications topic.        

 

 

Function:LongToStr        
Result-type:Text        
Arguments:nValue, nBase        
Description:Converts a numeric value into text using the base indicated (e.g. 8 for octal, 10 for decimal, 16 for hexadecimal).  For decimal, you can also use the simpler Str() function        

 

 

Function:Int        
Result-type:Numeric        
Arguments:nValue        
Description:Truncates a number to an integer        

 

 

Function:MDY        
Result-type:Text        
Arguments:dDate        
Description:Returns the date in the text form 'mmm d, yyyy', for instance 'July 8, 2005'        

 

 

Function:MonthText        
Result-type:Text        
Arguments:dDate        
Description:Returns the month name as text        

 

 

Function:N        
Result-type:Numeric        
Arguments:eExpression        
Description:Forces an 'Unknown' expression to look like a numeric expression -- it won't necessarily do conversion, it's simply used to satisfy argument type verifications where a function is used that returns an 'Unknown' type inside a function that requires an 'nValue' argument        

 

 

Function:OEMtoANSI        
Result-type:Text        
Arguments:cText        
Description:Convert OEM cText to ANSI characters        

 

 

Function:Percent        
Result-type:Text        
Arguments:nValue        
Description:Converts a numeric value into percentage text. Example: 3.5 -> '3.5%'        

 

 

Function:R        
Result-type:Record        
Arguments:eExpression        
Description:Forces an 'Unknown' expression to look like a record expression -- it won't necessarily do conversion, it's simply used to satisfy argument type verifications where a function is used that returns an 'Unknown' type inside a function that requires a 'record' argument        

 

 

Function:Round        
Result-type:Numeric        
Arguments:nValue, nDecimalPlaces        
Description:Rounds a value to the given number of decimal places        

 

 

Function:Str        
Result-type:Text        
Arguments:nValue [, nLength [, nDecimalPlaces]]        
Description:Converts a number to text, with an optional specific length and optional number of decimal places. If the length is > 0 it will be left-padded with spaces if possible, or truncated if necessary. If the whole number can't be shown, '###' will fill the length.        

 

 

Function:StrToLong
Result-type:Numeric        
Arguments:cText, nBase        
Description:Converts text to a numeric value assuming the base indicated (e.g. 8 for octal, 10 for decimal, 16 for hexadecimal), if possible (up to the first non-numeric character encountered).  For decimal, can also use the simpler Val() function.

 

 

Function:TextToDate        
Result-type:Date/Time        
Arguments:cDate        
Description:Converts a text date into a date/time value        

 

 

Function:TextToTime        
Result-type:Date/Time        
Arguments:cTime        
Description:Converts a text time into a date/time value        

 

 

Function:TimeToText        
Result-type:Text        
Arguments:dTime        
Description:Converts a Time value into text, in the default time format, e.g. HH:MM AM. The time value is actually a date/time value, but the date is ignored. For instance, you can use DateTime() to get the current time as an argument.        

 

 

Function:        TrimAllNonDigits        

Result-type:        Text        

Arguments:        cText        

Description:        Extracts digits from text, returning only the digits as text. Example: 'cell (212) 555-1212' -> '2125551212'        

 

 

Function:Val        
Result-type:Numeric        
Arguments:cText        
Description:Converts text to a numeric value, if possible (up to the first non-numeric character encountered)        

 

 

Function:VarType        
Result-type:Text        
Arguments:eExpression        
Description:Returns a character representing the type of value the argument represents. 'C' = text (character), 'N' = numeric, 'D' = date, 'B' = boolean, 'R' = record, 'X' = null (error), 'U' = unknown        

 

 

 

 

 

 


Page URL https://CampgroundMaster.com/help/conversion.html

Campground Master Home