Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: Cstr() vs Format()...what is the difference


Message #1 by "kg729" <keith_grabiec@i...> on Mon, 21 Oct 2002 20:20:35
With Format you can specify the formatting you want using the 
extra parameters. The usage is a little cryptic and not very
much documentated, but VB6 introduced new functions like FormatNumber,
FormatDateTime and alike that make the formatting much easier.

Marco

> I am doing international programming with regionally aware locals. I was 
w> ondering what the difference was between using format() and Cstr() was 
as 
b> oth seem to convert to a regionally aware variant string. 

> Dim d as double
s> im s as string

> d = 65.54
s>  = format(d)
s>  = cstr(d)

  Return to Index