将会话值转换为分钟 [英] convert session value to minute

查看:66
本文介绍了将会话值转换为分钟的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须将会话[datetime]转换为分钟。

我们可以在asp.net c#中执行。如果是,那么如何?

i have to convert session["datetime"] to minute .
can we do in asp.net c#.if yes then how?

推荐答案

使用Convert.ToDateTime(string)将字符串转换为datetime,并从该datetime转换分钟...

如果datetime包含小时而你想要它们在几分钟内,只需转换它们到分钟并添加到从日期时间检索的分钟...
Use Convert.ToDateTime(string) to convert the string to datetime and from that datetime extract the minutes...
if the datetime contains hours and u want them in minutes, simply convert them to minutes and add to the minutes retrieved from the datetime...


这篇关于将会话值转换为分钟的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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