LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default 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
 
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
Converting date/time serial values to cumulative time totals... Kevin B Excel Discussion (Misc queries) 4 October 18th 07 05:05 PM
Formula to give date and time Angela1979 Excel Worksheet Functions 6 April 13th 07 02:36 AM
How Do I Eliminate the Serial Number for time from Date? Bob Gotti Excel Discussion (Misc queries) 2 January 19th 06 05:24 PM
Format serial date and time Cedric Excel Discussion (Misc queries) 2 December 26th 05 09:06 PM
extract time from excel serial date Dan W[_2_] Excel Programming 4 June 8th 04 06:52 PM


All times are GMT +1. The time now is 03:50 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"