If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Date syntax to show current year and day
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 |
#2
|
|||
|
|||
"Dave Elliott" wrote in message
m 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) -- Dirk Goldgar, MS Access MVP www.datagnostics.com (please reply to the newsgroup) |
#3
|
|||
|
|||
On Mon, 03 Jan 2005 22:25:10 GMT, "Dave Elliott"
wrote: 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] |
Thread Tools | |
Display Modes | |
|
|