only the date part

O

oldyork90

No time component, just the date. This seems a bit much. Is this how
it's done?

Dim dt As Date: dt = Now()
Dim justDate As Date: justDate = DateValue(DatePart("m", dt) & "/" &
DatePart("d", dt) & "/" & DatePart("yyyy", dt))
 
C

Claus Busch

Hi,

Am Sat, 23 Mar 2013 07:08:11 -0700 (PDT) schrieb oldyork90:
No time component, just the date. This seems a bit much. Is this how
it's done?

with Date you get only the date of today:
dt=Date


Regards
Claus Busch
 
L

Living the Dream

Try

Dim myDate as String

TheDate = Now()
MyDate = Format(TheDate, "M/D/YYYY")

HTH
Mick.
 
A

Adrien Huvier

Le 23/03/2013 15:57, Claus Busch a écrit :
Hi,

Am Sat, 23 Mar 2013 07:08:11 -0700 (PDT) schrieb oldyork90:


with Date you get only the date of today:
dt=Date

Or, for any date in dt:
justDate=Int(dt)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top