Hi Patrick,

I think the Format function considers "1:00" to be a string and subsequently can't 
match with the formatting defined by "hh:mm tt"

try this:

Format(CDate("1:00"), "hh:mm tt")

cheers,
mw

> -----Original Message-----
> From: Patrick Burrows [mailto:[EMAIL PROTECTED]]
> Sent: Monday, 27 May 2002 11:53 AM
> To: [EMAIL PROTECTED]
> Subject: [DOTNET] VB.NET Oddity
> 
> 
> Can anyone explain to me these results in VB.NET:
> 
> ?Format("1:00", "hh:mm tt")
> "hh:mm tt"
> 
> I am expecting it to be "1:00 am"
> 
> I can get named formats to work ("Medium Time") but not any 
> custom formats.
> 
> What am I missing?
> 
> You can read messages from the DOTNET archive, unsubscribe 
> from DOTNET, or
> subscribe to other DevelopMentor lists at http://discuss.develop.com.
> 

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to