我能给你最好的咨询吗 [英] can i have your best consult

查看:67
本文介绍了我能给你最好的咨询吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么方法可以计算c#

is there any way to count the time from login to logout in c#

推荐答案



存储登录时间并从他们注销时的登录时间计算注销时间.

您可以使用会话,cookie或数据库作为存储.
Hi,

Store the login time and calculate the logout time from login time when they logged out.

You can use session,cookie or DB as storage.


希望这篇文章对您有所帮助
跟踪用户的登录/注销时间
您可以根据登录时间和注销时间计算时间跨度
Hope this articl helps
Tracking users login/logout time
you can calculate time span from Login time and logout time


将登录时间记录在变量中,注销后记录并减去.

一旦有了区别,您只需将其放在文本框中即可.

使用 DateTime.Subtract 方法
Record the login time in a variable, when they logout, record that and subtract.

Once you have the difference, you can simply put it in the textbox.

use DateTime.Subtract method


这篇关于我能给你最好的咨询吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆