PDA

View Full Version : Date Format Error



Texasd
02-01-2007, 05:54 AM
Good Morning!

Can someone help with this? I am receiving a Run-Time Error 13 - Type Mismatch.


thisdate = Int(Now)
revdate = Format(thisdate, "m/d/yy")


It doesn't like the format. I originally was using "dd" which worked fine but now need the full date.

Thank you,
Donna

Charlize
02-01-2007, 05:59 AM
Perhaps :

Dim revdate As Date
revdate = Format(Now, "m/d/yy")
Charlize

Texasd
02-01-2007, 06:13 AM
Duh...had it as double. Thank you!

Bob Phillips
02-01-2007, 08:16 AM
Perhaps :
Dim revdate As Date
revdate = Format(Now, "m/d/yy") Charlize

Surely, revdate is a string here, and why use Now



Dim revdate As String

revdate = Format(Date, "m/d/yy")

Charlize
02-01-2007, 08:29 AM
Surely, revdate is a string here, and why use Now


Dim revdate As String
revdate = Format(Date, "m/d/yy")
Surely ? I don't know. Can't read the mind. Don't know what the poster wanted to do.
Why Now. The poster used it so I just took it over without further thinking about it.

Charlize