home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.visual.basic      MS Visual Basic discussions, NOT dot-net      10,840 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 10,000 of 10,840   
   J French to dean.earley@icode.co.uk   
   Re: DateDiff giving wildly wrong values   
   06 Apr 06 12:22:12   
   
   From: erewhon@nowhere.uk   
      
   On Thu, 06 Apr 2006 10:26:33 +0100, Dean Earley   
    wrote:   
      
   >I have the following code to get the number of seconds into a day given   
   >a date/time value:   
   >   
   >TValS = DateDiff("s", DateValue(StillDate), StillDate)   
      
   Is StillDate a String or a Date ?   
      
   It looks as if you are trying to get seconds from midnight   
      
   >StillDate is #04/05/2006 21:03:52#, and DateValue is correct at   
   >#04/05/2006# yet TValS is giving me -2429768 (Yes, negative 2.4 million)   
   >   
   >This only occurs on 3 machines we've seen so far (none we have direct   
   >access to)   
   >Has anyone ever seen anything like this before or can point to a   
   >particular hardware "feature"?   
      
   Most likely a Locale problem   
      
   If StillDate is a Date type then extract its bit after the decimal   
   point and multiply by 24 * 60 * 60 to get seconds   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca