If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > Server clock

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-28-04, 07:26
Wolverchenus Wolverchenus is offline
Registered User
 
Join Date: Mar 2004
Posts: 34
Question Server clock

Hello folks,

I am working on a program on this system where a few computer connect to a MS SQL server and record certain events.

Thing is, I need to log the events with a time stamp so I'll need to find the server clock somehow and access time is vital.

How do I do that?

I program in VB6.

Thanks
Chen
Reply With Quote
  #2 (permalink)  
Old 04-28-04, 11:16
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,606
In SQL Server, use the GetDate() function.

-PatP
Reply With Quote
  #3 (permalink)  
Old 04-28-04, 11:37
Wolverchenus Wolverchenus is offline
Registered User
 
Join Date: Mar 2004
Posts: 34
Yes,
But how do I use it?

I can't just do a -

dim a as string

a=select getdate()

or whatever..
Reply With Quote
  #4 (permalink)  
Old 04-28-04, 12:07
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,606
Just SELECT it (using ADO) like you would any other date.

-PatP
Reply With Quote
  #5 (permalink)  
Old 04-28-04, 13:34
Wolverchenus Wolverchenus is offline
Registered User
 
Join Date: Mar 2004
Posts: 34
Let's say I usually select things into a recordset.

How would I call that field in the recordset results?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On