vb.net 如何从 VB .NET 中的 Now() 减去小时

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/27319820/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-17 18:33:14  来源:igfitidea点击:

How to Subtract Hours from Now() in VB .NET

vb.net

提问by TheDProgrammer

What is the simplest way to Subtract 9 Hours from NOW() in VB .NET?

在 VB .NET 中从 NOW() 中减去 9 小时的最简单方法是什么?

I am using NOW() function in VB .NET to get the Current DateTime in the below mentioned format:

我在 VB .NET 中使用 NOW() 函数以下面提到的格式获取当前日期时间:

"12/5/2014 9:24:47 PM"

“12/5/2014 9:24:47 PM”

I want to Subtract 9 Hours from the DateTime.

我想从日期时间中减去 9 小时。

Thanks

谢谢

回答by Calvin