Date syntax to show current year and day

  • Thread starter Thread starter Dave Elliott
  • Start date Start date
D

Dave Elliott

I have this code for an unbond control on my form, I need it instead to show
the current year and beginning day of year. January 1, 2005 or whatever is
current.
Me.StartDate = DateAdd("yyyy", -1, Date) + 1
 
Dave Elliott said:
I have this code for an unbond control on my form, I need it instead
to show the current year and beginning day of year. January 1, 2005
or whatever is current.
Me.StartDate = DateAdd("yyyy", -1, Date) + 1

I'm not sure if this is what you're after, but it will always give you
January 1st of the current year:

Me.StartDate = DateSerial(Year(Date), 1, 1)
 
I have this code for an unbond control on my form, I need it instead to show
the current year and beginning day of year. January 1, 2005 or whatever is
current.
Me.StartDate = DateAdd("yyyy", -1, Date) + 1

Try DateSerial(Year(Date()), 1, 1)

John W. Vinson[MVP]
 
Back
Top