比较日期时间 [英] comparing date time

查看:68
本文介绍了比较日期时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述






我有一个例程,可以用字符串向量读取日期和时间,即:


30/02/2005 19:20

在某些时刻,我需要检查矢量中是否有日期,例如

当前日期与时间> =当前时间和< =(当前时间+ n分钟)


我是C ++的新手,但是,我知道如何在矢量中搜索,但是

我怎么能比较日期时间?


提前谢谢


J

PD:我正在使用VC ++ 6


Hi

I′ve a routine that will read date and times in a vector of strings ie:

30/02/2005 19:20
In some moment I′ll need to check if there are in vector a date like
current date with a time >= current time and <= (current time + n minutes)

I′m new to C++ but, nevertheless, I know how to search in a vector, but
how could I make date time comparisons ?

Thanks in advance

J
PD: I′m working with VC++ 6

推荐答案

" Javier"写道:
"Javier" writes:
我有一个例程,它将在一个字符串向量中读取日期和时间,即:

30/02/2005 19:20
I′ve a routine that will read date and times in a vector of strings ie:

30/02/2005 19:20




不要改变主题,但这个星球上的地方是这样的时间

表示使用和有效?



Not to change the subject but where on this planet is such a time
representation used and valid?

< br>

osmium写道:
" Javier"写道:

"Javier" writes:

我有一个例程,它将在一个字符串向量中读取日期和时间,即:

30/02/2005 19 :20
I′ve a routine that will read date and times in a vector of strings ie:

30/02/2005 19:20



不改变主题,但这个星球上的地方是这样的时间
表示使用和有效?


Not to change the subject but where on this planet is such a time
representation used and valid?



我已经看到了这个订单,但没有看到军方的标点符号

,而且经常在欧洲。


I''ve seen that ordering, but not with that punctuation in the Military
and frequently in Europe.


" Ron娜塔莉"写道:
"Ron Natalie" writes:
osmium写道:
" Javier"写道:

"Javier" writes:

我有一个例程,它将在一个字符串向量中读取日期和时间,即:

30/02/2005 19 :20
I′ve a routine that will read date and times in a vector of strings ie:

30/02/2005 19:20



不是要改变主题,而是在这个星球的哪个地方使用和有效的表示?


Not to change the subject but where on this planet is such a time
representation used and valid?


我已经看到了订购,但没有看到军队中的那个标点符号,而且经常在欧洲。


I''ve seen that ordering, but not with that punctuation in the Military
and frequently in Europe.




对我来说肯定看起来像2月30日。



It sure looks like February 30th to me.


这篇关于比较日期时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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