CDate

CDate(Expression) As Date

CDate is used to convert values to a Date type. You can for example convert Longs to Days, Doubles to Date and String. CDate is a very tricky one and is advised to use with care. In Polar Studio, you can often better use pContext.StringToDate(pValue). That function respects the user's locals and is the same routine as is used to convert strings web-application to dates. For more technical use, you may want to use DateSerial instead.

a = CDate("#2055-10-08#")
b = CDate(45652.54432)
c = CDate("#13:55#")

See also: