本文介绍了如何查找天气DateTime.Now在dateTime1和DateTime2之间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我必须要DateTime Fileds(dateTime1和DateTime2)
我想检查天气,当前的日期和时间在dateTime1和dateTime2之间

我尝试过此代码,但没有得到我所需要的

Hai all,

I have to DateTime Fileds(dateTime1 and DateTime2)
I want to check weather the current Date and Time is in between dateTime1 and dateTime2

I tried this Code but didn''t get what i need

if ((DateTime.Now > dateTime1) && (DateTime.Now < dateTime2))
       {
            //
       }



其中dateTime1小于当前日期,而dateTime2大于当前日期

我怎样才能做到这一点?请帮助我..



where dateTime1 is lessthan current Date and dateTime2 is greaterthan current Date

How can I do this? Please help me..

推荐答案


这篇关于如何查找天气DateTime.Now在dateTime1和DateTime2之间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-16 09:37