预订拼图.... [英] Booking puzzle....

查看:82
本文介绍了预订拼图....的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好大师,

我正在建立一个小型预订系统,我已经来到了一个安静的单调的

陷阱。


我需要确保人们今天没有预订明天的时间

大于或等于11.

你们当中有些人可能已经知道了答案,但事实并非如此。

对我来说很明显。


有谁可以帮我解决这个难题?


预订时间不重要。只有我们制作的时间

这个预订

且仅在今天之后的第二天。

非常感谢提前


JB

解决方案

if BookingDate> DateTime.Today.Date&&

DateTime.Now.ToString(" HH:mm:ss")> 23:00

{

返回;

}


HTH
Shankar

bredal Jensen写道:

你好大师,

我正在建立一个小型预订系统我已经安静地来了一个单调乏味的陷阱。

我需要确保人们不会在明天预订,而今天的时间
大于或等于11。

你们中的一些人可能已经知道了答案,但这对我来说并不是那么明显。

任何人都可以为我解决这个难题吗? />
预订时间不重要。只有我们制作这个预订的时间
并且只有在今天之后的第二天。

非常感谢提前

JB




-

最好的问候

Shankara Narayanan


这对我没有帮助,因为它应该是

可以在明天和其他所有日期之后预订

futue。

只是不是明天。


顺便说一句,我的意思是上午11点,但我想这可能不是那么的

很重要。


" Shankara Narayanan" < JS ***** @ yahoo.co.in>在消息中写道

news:u0 ************** @ TK2MSFTNGP10.phx.gbl ...

if BookingDate> DateTime.Today.Date&&
DateTime.Now.ToString(" HH:mm:ss")> 23:00
{
返回;
}

HTH
Shankar

bredal Jensen写道:

你好大师,

我正在建立一个小型预订系统,我已经安静地来了一个
繁琐的降价。
我需要确保人们明天没有预订,因为今天
的时间大于或等于11。

你们中的一些人可能已经知道了答案,但这是对我来说不是那么明显。

任何人都可以为我解决这个难题吗?

预订时间并不重要。只有我们预订的时间才是
,只有在今天之后的第二天。

非常感谢提前

JB



-
最好的问候
Shankara Narayanan



< blockquote>我认为我发现了一些有用的东西:

if(DateTime.Now.AddHours(10).Day == bookDate.Day){不要预订}

..我已经测试了它的工作原理,但是它需要一些数学来证明它不会在20或30年内突破



我想想。



" bredal Jensen" <峰; br ****** @ jensen.dk>在消息中写道

新闻:uO ************** @ TK2MSFTNGP09.phx.gbl ...

好吧它没有帮助我,因为它应该可以预订明天之后的一天和所有其他日子的
即将到来。
只是不明天。

顺便说一下,我的意思是上午11点,但我想这可能不是那么重要。


Shankara Narayanan < JS ***** @ yahoo.co.in>在消息中写道
新闻:u0 ************** @ TK2MSFTNGP10.phx.gbl ...

if BookingDate> DateTime.Today.Date&&
DateTime.Now.ToString(" HH:mm:ss")> 23:00
{
返回;
}

HTH
Shankar

bredal Jensen写道:

你好大师,

我正在建立一个小型的预订系统,我已经安静地来了一个乏味的降价。

我当今天的时间大于或等于11时,需要确保人们不会为明天预订。

你们中的一些人可能已经知道了答案,但这并不是很明显的我。

任何人都可以为我解决这个难题吗?

预订时间并不重要。只有我们预订的时间
并且只在今天之后的第二天。

非常感谢提前

JB



-
最好的问候
Shankara Narayanan




Hello gurus,
I''m building a small booking system and i have come accross quiet a tedious
pitfall.

"I need to make sure that people do not book for tomorrow when todays time
is greater or equal to 11."
Well some of you probably allready know the answer but this is not so
obvious for me.

Can anyone solve this puzzle for me?

The booking hour is of no importance. Only the hour at which we are making
this booking
and only if it is the day after today.
Many thanks in advance

J.B

解决方案

if BookingDate > DateTime.Today.Date &&
DateTime.Now.ToString("HH:mm:ss") > "23:00"
{
return;
}

HTH
Shankar
bredal Jensen wrote:

Hello gurus,
I''m building a small booking system and i have come accross quiet a tedious
pitfall.

"I need to make sure that people do not book for tomorrow when todays time
is greater or equal to 11."
Well some of you probably allready know the answer but this is not so
obvious for me.

Can anyone solve this puzzle for me?

The booking hour is of no importance. Only the hour at which we are making
this booking
and only if it is the day after today.
Many thanks in advance

J.B



--
With best Regards
Shankara Narayanan


well it does not help me because it should be
possible to book for the day after tommorrow and all the other days in the
futue.
Just not tomorrow.

And by the way , i meant 11 AM, but i guess it is probably not so
important.


"Shankara Narayanan" <js*****@yahoo.co.in> wrote in message
news:u0**************@TK2MSFTNGP10.phx.gbl...

if BookingDate > DateTime.Today.Date &&
DateTime.Now.ToString("HH:mm:ss") > "23:00"
{
return;
}

HTH
Shankar
bredal Jensen wrote:

Hello gurus,
I''m building a small booking system and i have come accross quiet a tediouspitfall.

"I need to make sure that people do not book for tomorrow when todays timeis greater or equal to 11."
Well some of you probably allready know the answer but this is not so
obvious for me.

Can anyone solve this puzzle for me?

The booking hour is of no importance. Only the hour at which we are makingthis booking
and only if it is the day after today.
Many thanks in advance

J.B



--
With best Regards
Shankara Narayanan



Well i think i have found something that works:
if (DateTime.Now.AddHours(10).Day==bookDate.Day) { do not book}
.. I have tested it works but
it requires some mathematics to prove that it will not break in 20 or 30
years
I Think.


"bredal Jensen" <br******@jensen.dk> wrote in message
news:uO**************@TK2MSFTNGP09.phx.gbl...

well it does not help me because it should be
possible to book for the day after tommorrow and all the other days in the futue.
Just not tomorrow.

And by the way , i meant 11 AM, but i guess it is probably not so
important.


"Shankara Narayanan" <js*****@yahoo.co.in> wrote in message
news:u0**************@TK2MSFTNGP10.phx.gbl...

if BookingDate > DateTime.Today.Date &&
DateTime.Now.ToString("HH:mm:ss") > "23:00"
{
return;
}

HTH
Shankar
bredal Jensen wrote:

Hello gurus,
I''m building a small booking system and i have come accross quiet a tediouspitfall.

"I need to make sure that people do not book for tomorrow when todays timeis greater or equal to 11."
Well some of you probably allready know the answer but this is not so
obvious for me.

Can anyone solve this puzzle for me?

The booking hour is of no importance. Only the hour at which we are makingthis booking
and only if it is the day after today.
Many thanks in advance

J.B



--
With best Regards
Shankara Narayanan




这篇关于预订拼图....的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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