Re: Get recent time/date

Tech-Archive recommends: Fix windows errors by optimizing your registry




"Bob Butler" <tiredofit@xxxxxxxxxx> wrote in message
news:uSVF04bCGHA.2920@xxxxxxxxxxxxxxxxxxxxxxx
>> Now I don't know if this would provide any significant performance
>> improvement or not, but I would suspect it would if the recordset is
>> sufficiently large. I suppose, however, that rounding errors could be
>> a problem. Does anyone know if there's ever a problem converting a
>> date/time to a Double?
>
> VB stores datetime values as doubles so I expect it's a simple copy
> operation but why would you convert them when you can compare them
> directly?
> If anything, I'd expect that to do nothing but slow it down.
>

I'm just thinking that VB probably compares the Double data type more
efficiently than the Date date type. Maybe not. As you say, internally VB
uses Double for datetime anyway, so maybe there's no difference whatsoever.

--
Mike
Microsoft MVP Visual Basic


.



Relevant Pages

  • Re: OO in Python? ^^
    ... > must implment the compare function that "elem" would use to compare if ... after the data type declaration -- assuming the data type is ... composition of a typeclass instance. ... like the standard "foldr" function. ...
    (comp.lang.python)
  • Re: long if function
    ... If it is a date/time data type, even though you are displaying as ... you can't compare Hour (ArrivalHour) to more than ... It might be a little cumbersome trying to rewrite the If...Then...ElseIf ...
    (microsoft.public.access.queries)
  • Mismatched Data Type in an Expression
    ... Below is a sub I am using to compare two request counters ... message on the SQL statement that says the data type is ... Dim M As Recordset, D As Database, C As Recordset ...
    (microsoft.public.access.modulesdaovba)
  • Re: Comparing string input to enum data type
    ... for something I'm attempting to do with enum data types. ... What I am doing now is reading from a text file a string. ... color it is from the enum data type. ... How can I compare a string like ...
    (comp.lang.c)
  • Re: Comparing string input to enum data type
    ... for something I'm attempting to do with enum data types. ... What I am doing now is reading from a text file a string. ... color it is from the enum data type. ... How can I compare a string like ...
    (comp.lang.c)