only the date part

  • Thread starter Thread starter oldyork90
  • Start date Start date
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))
 
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
 
Try

Dim myDate as String

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

HTH
Mick.
 
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)
 
Back
Top