Click here to Skip to main content
15,914,820 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
:(( Dear Sir,

I am developing a payroll application which maintain date & time but when I save the date & time which save the date & time of every client machine. which is not currect because any body can change the time and date of client machine's system date & time. I want system should save date & time of server machine where database is resided.
So how to possible please help me with a sample code.


thanking You


Debasis Bag
Posted

1 solution

So don't send the date and time from your application and let the database do this step for you Ex:

if you want to save the login time of every user then excute sql query and inside the query call the datetime function in your database

insert into logs ( loginTime ) values ( now() ) ; 


for sure this statement will be different from database to another
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900