View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
kirkm[_8_] kirkm[_8_] is offline
external usenet poster
 
Posts: 166
Default VB Format command fails

On Thu, 30 Apr 2009 00:13:01 -0700, OssieMac
wrote:

Hi Ossie

Format function reutrns a string value not a date value and hense cannot be
assigned to a date variable.


Aha... OK

00/11/75 is not a valid date and you can't even use DateValue to return a
date from it.

You can use Val but it will return zero.

What are you trying to achieve? There may be another way.


Change '00/11/75' into "Nov 1975".

I normally go with some pretty basic stuff but was sure VB would
know "11" was November and 1975 was... 1975... if I could
figure out how! I have used Format with "mm ddd yyyy" but
this was to output a string (as you say).

Thanks - Kirk