Table 6-5. Conversion Functions
Basic Syntax | Crystal Syntax |
---|---|
CBool(number), CBool(currency) | CBool(number), CBool(currency) |
CCur(number), CCur(string) | CCur(number), CCur(string) |
CDbl(currency), CDbl(string), | CDbl(boolean) |
CDbl(currency), CDbl(string), | CDbl(boolean) |
CStr() | CStr() |
CDate(string), CDate(year, month, day), CDate(DateTime) | CDate(string), CDate(year, month, day), CDate(DateTime) |
CTime(string), CTime(hour, min, sec), CDate(DateTime) | CTime(string), CTime(hour, min, sec), CDate(DateTime) |
CDateTime(string), | CDateTime(date), |
CDateTime(date, time), | CDateTime(year, month, day) |
CDateTime(string), | CDateTime(date), |
CDateTime(date, time), | CDateTime(year, month, day) |
CDateTime(year, month, day, hour, min, sec) | CDateTime(year, month, day, hour, min, sec) |
ToNumber(string), ToNumber(Boolean) | ToNumber(string), |
ToNumber(boolean) | ToText() |
ToText() | IsDate(string), IsTIme(), IsDateTime() |
IsDate(string), IsTIme(), IsDateTime() | IsNumeric(string) |
IsNumeric(string) | ToWords(number), |
ToWords(number, decimals) | ToWords(number), |
ToWords(number, decimals) |