Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / November 2005

Tip: Looking for answers? Try searching our database.

Function For Last Day/First Day Of Previous/Next Year ??

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dave Gibson - 29 Nov 2005 18:04 GMT
Hi,

Would anyone be able to let me know if there is some function or
multiple functions that will allow me to obtain the serial dates of
the last day of the previous year and the first day of the next year
based on a date field called [CurrentYear]

I wish to use the function/formula in the query grid rather than VB or
SQL.

Thanks
Marshall Barton - 29 Nov 2005 19:28 GMT
>Would anyone be able to let me know if there is some function or
>multiple functions that will allow me to obtain the serial dates of
[quoted text clipped - 3 lines]
>I wish to use the function/formula in the query grid rather than VB or
>SQL.

Doesn't matter where you want to use it.  (Besides, what you
specify in a query's design grid is translated to SQL before
it can be used.)

Last date of previous year:
    DateSerial(Year(CurrentYear) - 1, 12, 31)

First date in next year:
    DateSerial(Year(CurrentYear) + 1, 1, 1)

Signature

Marsh
MVP [MS Access]

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.