如何在控制台应用程序中将mints添加到datetime

编程入门 行业动态 更新时间:2024-10-26 11:12:57
本文介绍了如何在控制台应用程序中将mints添加到datetime的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

实际上我从users表中获取Created_Date_Time并保存在字符串crtdt中。现在我想为Created_Date_Time添加30分钟。是否有可能在控制台应用程序

Actually i am getting Created_Date_Time from users table and saving in the string crtdt. now i want to add 30 min to that Created_Date_Time. is it possible in console application

推荐答案

看看下面的例子: Have a look at below example: DateTime currentTime = DateTime.Now; currentTime = currentTime.AddMinutes(30); Label.Text = currentTime.ToString();

以上代码将在当前日期时间增加30分钟。

Above code will add 30 minutes to the current datetime.

更多推荐

如何在控制台应用程序中将mints添加到datetime

本文发布于:2023-11-13 21:49:22,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1585408.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:控制台   中将   应用程序   如何在   datetime

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!