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.

Hello Guest,Our records indicate that you have never posted to our site before! Why not make your first post today by saying hello to our community in our Introductions forum.

Please review the forums rules, start with your first post today and become an active part of petri.co.il forums now!

I need to figure out how to write this information into a database, so that I can make a website for my boss to run reports against the information. If someone could show me how to write a variable to a database in a login script that would be great. Or even better modify my script to write the current outputs to a database instead of the .log file.

I also need to find a way to put the month, day, year, time in their own fields to allow for better sorting. Does anyone know how to grab these specific informations?

To break the Day, Month and Year to different variables, you can do something like this;dt = date() '<-- just one call to the date function is enough
sYear = Year(dt)
sMonth = Right(100+Month(dt),2)
sDay = Right(100+Day(dt),2)OR in "military" date format it would be;dt = date() '<-- just one call to the date function is enough
sDay = Right(100+Day(dt),2)
sMonth = MonthName(Month(dt), True)
sYear = Right(Year(dt),2)

In the sample below I created just one yyyymmdd variable ("EntryDate"), this is also good sortable.

User Logons are written directly to the database.
You can import the data to HTML by using a script.

\Rems

Note;At least MDAC2.0 installed is required to run the ADOX code

EDIT

When date/Time registration is important, you must be sure that users cannot manupilate time on their computers.
And make sure that the time on all the computers are set the correct timezone and the time is insync with the dcs on the network and their timezone is correct.

The 'onTime' column in the example datebase just shows the time, the date is in and other format in an other column. This is not realy nesseray for sorting since this is a database, you can configure a column to DateTime format, so the database can sort on date. Just put the dt (Date+Time) value to the column "onTime"

If you want to use the logged time to calculate with other time values, then it is required to save also the 'time offset from GMT' (BIAS).
The 'Current TimeZone' is the offset time included the daylightsavings correction. The offtime value is in plus or minus the amount of minutes.
You can determine the value using WMI or read it from the registry. The currenttime format for the column "EntryDate" will then be: yyyymmddhhmmss.000000+60

example how to read the 'current GMT offset in minutes' from the registry