Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Returning a date as a serial umber

I have a datetime as a variant variable. How can I format
it as the equivalent serial number?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default Returning a date as a serial umber

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)
--
HTH. Best wishes Harald
Followup to newsgroup only please

"David" skrev i melding
...
I have a datetime as a variant variable. How can I format
it as the equivalent serial number?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula for Serial Date n+2 +2 +3 +2 +2 +3... Galen Excel Discussion (Misc queries) 4 December 11th 08 10:13 PM
Date String To Serial goss[_2_] Excel Discussion (Misc queries) 11 November 9th 08 05:26 AM
serial value to date in excel [email protected] Excel Worksheet Functions 0 August 12th 08 07:46 PM
Serial number of Date Gazzr Excel Worksheet Functions 2 March 24th 06 08:59 AM
How do I convert Date serial number to date rdunne Excel Worksheet Functions 1 April 12th 05 03:04 PM


All times are GMT +1. The time now is 03:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"