vb.net DateTime.Now 和接下来的 15 分钟
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/25152555/
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
vb.net DateTime.Now and next 15 mins
提问by ???????? ???????????
New DateTime(Now.Year, Now.Month, Now.Day, Now.Hour, Now.Minute + 15, Now.Second)
im want to get time next now 15 mins but i use this code but don't work...
我想在接下来的 15 分钟内腾出时间,但我使用此代码但不起作用...
it will error if now more than "XX:46" pls help me
如果现在超过“XX:46”请帮助我,它会出错
回答by Luke Hoffmann
Date.Now().AddMinutes(15)
Date.Now().AddMinutes(15)
It's better to use the built-in method of the Date type than to create a new New DateTime.
最好使用 Date 类型的内置方法,而不是创建一个新的 New DateTime。
回答by Jatin Gadhiya
You can do,
你可以做,
Dim MyDateTime AS DateTime
MyDateTime.Now().AddMinutes(15)
now you can use MyDateTime
现在您可以使用 MyDateTime
i hope this help you
我希望这对你有帮助

