473,320 Members | 2,098 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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

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
2 1439
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Graeme Longman | last post by:
Hi everyone, I was wondering if anyone has written some Python code which uses a start date and end date and a given interval (day, month or year) and outputs all the time periods for that range...
2
by: androtech | last post by:
Hello, I'm looking for a function that returns a date range for a specified week number of the year. I'm not able to find functions like this anywhere. Any pointers/help would be much...
30
by: Dr John Stockton | last post by:
It has appeared that ancient sources give a method for Numeric Date Validation that involves numerous tests to determine month length; versions are often posted by incomers here. That sort of code...
1
by: sylvian stone | last post by:
Hi, I've used standard date functions in the past, but need to create something a little different, as I am working on an investment calculator. What I need to do is validate two dates, and...
3
by: Paolo | last post by:
I have a query with a field named RECEIVED in which I have the following criteria: >=DateAdd('d',-Day(Date())+1,Date()) This Criteria returns all records which show a starting with the 1st...
29
by: james | last post by:
I have a problem that at first glance seems not that hard to figure out. But, so far, the answer has escaped me. I have an old database file that has the date(s) stored in it as number of days. An...
1
by: JonathanParker | last post by:
Another quick one! Trying to search for records by both accounting period and by year in two seperate queries actioned by option buttons. I've sorted the formatting so it's in a UK format but I...
4
by: norma.j.hildebrand | last post by:
I have a database that has a field (performance standard), every year the standard changed which was not a problem since we start out each year with a blank database and just change the standards...
9
by: Mo | last post by:
After a little PHP education, my first project (to get my feet wet) is making an employee time-tracking program for our small business. *** ANY SUGGESTION, THOUGHTS, OR ADVICE WOULD BE WARMLY...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.