Extracting the week number

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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
 
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.
 
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
 
Back
Top