Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DATETIME() problem.
Message
From
24/03/2000 15:09:08
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00124841
Message ID:
00350173
Views:
35
>How do you get the server time, using VFP6, if it was NT server?


I got the idea from Ed Rauh.
lparameters tcDataFile && Any file that reside on server data path
lcOldFullpath = set("fullpath")
lcOldSeconds = set("seconds")
set fullpath on
use (tcDataFile) in 0 alias "crsDummy"
lcDataPath = substr(dbf("crsDummy"),1,rat("\",dbf("crsDummy")))
use in "crsDummy"
set fullpath &lcOldFullpath
lcTempFileName = lcDataPath + "T"+sys(2015)+".tmp"
handle = fcreate(lcTempFileName)
ltServerTime = ctot(dtoc(fdate(lcTempFileName))+" "+ftime(lcTempFileName))
=fclose(handle)
erase (lcTempFileName)
set seconds &lcOldSeconds
return ltServerTime
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform