First of the year date

vgersghost

Vgersghost
Local time
Today, 12:46
Joined
Apr 29, 2005
Messages
106
I have a control box I want to populate with the first day of the year. You have to pick a year form a list and then I need it to show the first day of the year no matter what year is picked.

Just can't figure it out. I'm hoping once I get shown how to get the first day I can use the little knowledge I have to figure out different dates.

I have information I found on the forum for almost all dates except the first day of the year. First and last day of months and etc.

thx
 
The day is just

Format(Date, "dddd")

so if you have control where a date has been picked, you can use

Format(Me.TextBoxNameHere, "dddd")

And if you just select a year from say a combo box;

Format(DateSerial(Me.ComboNameHere, 1, 1), "dddd")
 
Thank you for the quick response.

Okay So how would I get a controlbox on the same form to always show the first of the year without picking a year. I can do easy dates!!

The query I'm working on works between the first of this current year and first of past years.
 
Thank you for the quick response.

Okay So how would I get a controlbox on the same form to always show the first of the year without picking a year. I can do easy dates!!

The query I'm working on works between the first of this current year and first of past years.

Let's say you have a text box on the form and you would set its control source to this:

=Format(DateSerial(Year(Date()), 1, 1), "dddd")
 
Wow this cool. I need to readmore! It shows Staurday. I been trying to make it show like 01/01/2011. I reading up on dateserial
 
Why show that? The first day of the year will always be 1/1 (seems strange to do)

But you can by simply

=DateSerial(Year(Date()), 1, 1)

Or if you want the whole thing:

=Format(DateSerial(Year(Date()), 1, 1), "dddd mmmm d, yyyy")
 
Thanks again. Now that I think about it it's kinda of stupid to show 01/01/2011, because your right, first of the year would always be 01/01/ something.

Done bothering you and thanks again for your quick response.
 

Users who are viewing this thread

Back
Top Bottom