By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,903 Members | 2,097 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,903 IT Pros & Developers. It's quick & easy.

Date Range Starting with 01/01 Jan01 of the same year

P: n/a
Iím working on setting a date range for filtering that is created
OnClick of a button.
I want to use the current date as the EndDate and the StartDate I want
to be the 01/01/SameYear.

Example:

Start 01/01/2008 End 08/13/2008

Using the Date function to give the current date, how do I code to
create the start date as displayed. Can it be done mathematically, is
there a function, or does is require parsing?

Thanks
Greg

Aug 13 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Greg (co*****@gmail.com) wrote:
Iím working on setting a date range for filtering that is created
OnClick of a button.
I want to use the current date as the EndDate and the StartDate I want
to be the 01/01/SameYear.

Example:

Start 01/01/2008 End 08/13/2008

Using the Date function to give the current date, how do I code to
create the start date as displayed. Can it be done mathematically, is
there a function, or does is require parsing?

Thanks
Greg
Function
? DateSerial(Year(date),1,1)
Mathematically
?Date-format(date,"y")+1
Parse
? "1/1" & Year(date)

Sleep
http://www.youtube.com/watch?v=HgQejnOWCEE
Aug 13 '08 #2

P: n/a
Great !

Thanks Salad
Greg
On Aug 13, 6:36*pm, Salad <o...@vinegar.comwrote:
Greg (code...@gmail.com) wrote:
Iím working on setting a date range for filtering that is created
OnClick of a button.
I want to use the current date as the EndDate and the StartDate I want
to be the 01/01/SameYear.
Example:
Start *01/01/2008 * *End *08/13/2008
Using the Date function to give the current date, how do I code to
create the start date as displayed. Can it be done mathematically, is
there a function, or does is require parsing?
Thanks
Greg

Function
? DateSerial(Year(date),1,1)
Mathematically
?Date-format(date,"y")+1
Parse
? "1/1" & Year(date)

Sleephttp://www.youtube.com/watch?v=HgQejnOWCEE- Hide quoted text -

- Show quoted text -
Aug 14 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.