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 / Forms Programming / December 2005

Tip: Looking for answers? Try searching our database.

Extracting the week number

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Samantha - 23 Dec 2005 02:25 GMT
I'm using MySQL as the backend database and MsAccess as the front end. My
question is: how can I extract the current week number from the current date
on the server. I need the server date because some end users tend to adjust
their computer's clock when they need to make certain transactions in other
applications. I know I can use the Date() function to get today's date from
the current computer clock. But how can extract the current date from the
server? Any help is greatly appreciated. Thank you.
Ofer - 23 Dec 2005 06:05 GMT
Try and create a PassTrough query that will return the date from the server,
then you can create a function that will open this query and return the date
on the server

Query:
Select GetDate()

Function:
Function ServerDate()
ServerDate = DlookUp("FieldName","QueryName")
End Function

> I'm using MySQL as the backend database and MsAccess as the front end. My
> question is: how can I extract the current week number from the current date
[quoted text clipped - 3 lines]
> the current computer clock. But how can extract the current date from the
> server? Any help is greatly appreciated. Thank you.
Samantha - 23 Dec 2005 19:15 GMT
Hi Ofer,
thanks for your quick response. I'm not understanding what you mean: you're
saying to use DlookUp to look at a fieldname and tablename. But I just want
the current date/time info from the server. The date/time info is not stored
in any table or field. What am I missing? thanks.

> Try and create a PassTrough query that will return the date from the server,
> then you can create a function that will open this query and return the date
[quoted text clipped - 15 lines]
> > the current computer clock. But how can extract the current date from the
> > server? Any help is greatly appreciated. Thank you.
Ofer - 25 Dec 2005 14:13 GMT
I assume that you are using SQL server, create a query, change the query to
Passthrough query, name it Get_ServerName

In the query type
Select GetDate() ServerDate

Create a function that will return this date
Function ServerDate()
ServerDate = DLookUp("ServerDate","Get_ServerName")
End Function

Now every where in your application
Date() will return the current date in the computer
ServerDate() will return the current date in the server

Signature

Please respond to the group if your question been answered or not, so other
can refer to it.
Thank you and Good luck

> Hi Ofer,
> thanks for your quick response. I'm not understanding what you mean: you're
[quoted text clipped - 21 lines]
> > > the current computer clock. But how can extract the current date from the
> > > server? Any help is greatly appreciated. Thank you.
 
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.