Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > comparing date time

Reply
Thread Tools

comparing date time

 
 
Javier
Guest
Posts: n/a
 
      02-21-2005

Hi

Ive a routine that will read date and times in a vector of strings ie:

30/02/2005 19:20


In some moment Ill need to check if there are in vector a date like
current date with a time >= current time and <= (current time + n minutes)

Im 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: Im working with VC++ 6
 
Reply With Quote
 
 
 
 
osmium
Guest
Posts: n/a
 
      02-21-2005
"Javier" writes:

> Ive 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?


 
Reply With Quote
 
 
 
 
Ron Natalie
Guest
Posts: n/a
 
      02-21-2005
osmium wrote:
> "Javier" writes:
>
>
>>Ive 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.
 
Reply With Quote
 
Ioannis Vranos
Guest
Posts: n/a
 
      02-21-2005
osmium wrote:

>>30/02/2005 19:20

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



What exactly do you think is invalid? In Europe dates are in the form
dd/mm/yyyy or dd/mm/yy.




--
Ioannis Vranos

http://www23.brinkster.com/noicys
 
Reply With Quote
 
Ioannis Vranos
Guest
Posts: n/a
 
      02-21-2005
Ioannis Vranos wrote:

>>> 30/02/2005 19:20

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

>
>
>
> What exactly do you think is invalid? In Europe dates are in the form
> dd/mm/yyyy or dd/mm/yy.


.... and time is used in both 12h/24h formats.



--
Ioannis Vranos

http://www23.brinkster.com/noicys
 
Reply With Quote
 
osmium
Guest
Posts: n/a
 
      02-21-2005
"Ron Natalie" writes:

> osmium wrote:
>> "Javier" writes:
>>
>>
>>>Ive 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.


It sure looks like February 30th to me.


 
Reply With Quote
 
Karl Heinz Buchegger
Guest
Posts: n/a
 
      02-21-2005
osmium wrote:
>
> "Ron Natalie" writes:
>
> > osmium wrote:
> >> "Javier" writes:
> >>
> >>
> >>>Ive 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.

>
> It sure looks like February 30th to me.


C'mon. The OP was simply typing an example without thinking and made a
mistake in the values. That doesn't change his problem.

--
Karl Heinz Buchegger
http://www.velocityreviews.com/forums/(E-Mail Removed)
 
Reply With Quote
 
Ioannis Vranos
Guest
Posts: n/a
 
      02-21-2005
Ioannis Vranos wrote:

>> What exactly do you think is invalid? In Europe dates are in the form
>> dd/mm/yyyy or dd/mm/yy.

>
>
> ... and time is used in both 12h/24h formats.



I just realised the OP's 30th of February...




--
Ioannis Vranos

http://www23.brinkster.com/noicys
 
Reply With Quote
 
Chris Croughton
Guest
Posts: n/a
 
      02-21-2005
On Mon, 21 Feb 2005 09:06:35 -0500, Ron Natalie
<(E-Mail Removed)> wrote:

> osmium wrote:
>> "Javier" writes:
>>
>>>Ive 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.


Military time is normally ISO 8601 now (yyyy.mm.ddThh:mm:ss, with optional
separators). Normal UK date notation is dd/mm/yyyy (continental Europe
tends to use dd.mm.yyyy, using - as separator is also common; prior to
2000 the year was often 2 digits instead of 4 (and sometimes still is
that way). Only the UK and dependencies now generally use the 12-hour
clock, a lot of European languages don't even have a concept of AM and
PM, and most public bodies in the UK now use 24-hour (buses, trains,
etc.).

(Of course, none of them actually use the 30th of February in any year,
but it was the representation which was being queried not the value...)

Chris C
 
Reply With Quote
 
Javier
Guest
Posts: n/a
 
      02-21-2005
osmium wrote:
> "Javier" writes:
>
>
>>Ive 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?
>
>



How much of this planet do you know ?

In Europe and all South America, people use to represent dates in that
way: dd/mm/yyyy. May be you need to make a trip through the 99,99% of
the world you unknown...

In this case, this data comes from a Visual Fox application and is
stored in that way in a MSDE.

J

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Comparing input date and system date anagai Javascript 5 10-22-2007 01:05 AM
Parsing date from sql string in asp.net, then comparing it with present date .Net Sports ASP .Net 1 06-24-2005 11:35 PM
Comparing a date field to a date in a form. Les Juby ASP General 3 04-23-2005 11:17 PM
Date, date date date.... Peter Grison Java 10 05-30-2004 01:20 PM
Date & Time chooser for java 1.1 - using only the mouse to select time & date Chris Berg Java 0 10-27-2003 10:59 PM



Advertisments