A VBA function to give serial date for date and time?
On Thu, 8 Jul 2004 08:56:21 -0400, "Android" wrote:
The date is a "Date" , and not a string. I was aware of DateValue, but as
you say, that requires a string to be fed to it.
If the date is a true date, then it "is" a serial number.
So to express it you could use something like CDbl(dt)
For example, with a Date in Selection, this SUB will express the serial number:
Sub dtser()
MsgBox (CDbl(Selection.Value))
End Sub
--ron
|