LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default today vs. now

Date is the VBA equivalent to the worksheet function Today.

You can strip the time from Now using Int

Int(now)

demo'd from the immediate window:

? date
1/11/2005
? int(now)
1/11/2005
? now
1/11/2005 11:18:24 AM


--
Regards,
Tom Ogilvy

"mike allen" wrote in message
...
i would like to use "today" in code, but i can't get it to work.
i can use "now" and it works, but i need the integer format that 'today'
provides.
i have tried rounding, declaring at integer, cint(now), etc.
sub temp()
cells(1,1)=today
end sub

thanks, mike allen (seems like my questions are getting simpler, not more
complex like they should be)




 
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
SUM (TODAY thru EOM) Ken Excel Discussion (Misc queries) 6 April 18th 08 04:39 PM
IF TODAY equals date in cell A10, or if TODAY is beyond that date SoupNazi Excel Worksheet Functions 4 April 23rd 07 01:14 AM
Today()-1 Wanna Learn Excel Discussion (Misc queries) 7 November 10th 06 07:25 PM
=IF(OR(TODAY()G9),"Pass","Overdue") Why doe it not wo. Fkor Excel Discussion (Misc queries) 3 March 10th 05 08:29 AM
Today() Richard Toller[_2_] Excel Programming 2 December 4th 03 10:48 PM


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