willem
06-18-2001, 11:58 AM
I experience problems converting a date to a string
Cstr(date)
My computer has problems compiling
error : expected some thing
Any help much appreciated
anhmytran
06-18-2001, 02:33 PM
Please, use the Format function instead.
Format function converts Numeric values (double, integer, date, currency)
into String values. You may search OnLine Help for more.
Here's some example:
txtQuantity.Text = Format(Quantity, "##,###,##0")
txtPrice.Text = Format(Price, "0,000,000.00")
txtDate.Text = Format(Now, "Short Date") or Format(Now, "Long Date")
txtCost.Text = Format(Quantity * Price, "Currency")
AnhMy_Tran