Returning a date as a serial umber

D

David

I have a datetime as a variant variable. How can I format
it as the equivalent serial number?
 
H

Harald Staff

Sub test()
Dim D As Date
D = Now
MsgBox Format(D, "General Number")
End Sub

(You should use a Date and not a Variant if Datetime is what it's filed with
at all times)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top