#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 55
Default date serial

How do I get today's date as a serial into a variable?

dim dDate as Date
dDate = serial NOW()

Of course the above does not work.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 400
Default date serial

try:

Sub aa()
Dim serdate As Long
serdate = DateValue(Now)
End Sub

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default date serial


dim lDate as long
ldate = clng(date)



Striker wrote:

How do I get today's date as a serial into a variable?

dim dDate as Date
dDate = serial NOW()

Of course the above does not work.


--

Dave Peterson
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
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
A VBA function to give serial date for date and time? Android[_2_] Excel Programming 6 July 8th 04 03:55 PM


All times are GMT +1. The time now is 07:27 AM.

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"