Connecting Tech Pros Worldwide Help | Site Map

Date Time Difference...

  #1  
Old December 28th, 2007, 01:55 AM
Steve
Guest
 
Posts: n/a
Hello all,

I was wondering if someone could help me here. Since I'm running and
iMac, I don't have Visual Basic (6) installed. I want a small function
returns the number of seconds between two dates.

Can anyone help me with this? I would appreciate it.

Thanks,

Steve

  #2  
Old December 28th, 2007, 03:35 PM
Auric__
Guest
 
Posts: n/a

re: Date Time Difference...


On Fri, 28 Dec 2007 01:54:02 GMT, Steve wrote:
Quote:
I was wondering if someone could help me here. Since I'm running
and iMac, I don't have Visual Basic (6) installed. I want a small
function returns the number of seconds between two dates.
>
Can anyone help me with this? I would appreciate it.
Dim result As Long, day1 As Date, day2 As Date
day1 = Now
day2 = Now - 1
result = DateDiff("s", day1, day2)

' If you always want a positive number, then:
result = Abs(DateDiff("s", day1, day2))

--
Talking to you is like talking to an omelet at times.

--
Posted via a free Usenet account from http://www.teranews.com

  #3  
Old January 1st, 2008, 11:55 AM
myford100@yahoo.com
Guest
 
Posts: n/a

re: Date Time Difference...


On Thu, 27 Dec 2007 20:54:02 -0500, Steve <stevetheimacuser@aol.com>
wrote:
Quote:
>Hello all,
>
>I was wondering if someone could help me here. Since I'm running and
>iMac, I don't have Visual Basic (6) installed. I want a small function
>returns the number of seconds between two dates.
>
>Can anyone help me with this? I would appreciate it.
>
>Thanks,
>
>Steve
Are you wanting the VB function or just the number of seconds? If the
latter, set up a simple spreadsheet and you'll even be able to format
the result the way you want.
  #4  
Old January 2nd, 2008, 04:05 PM
Auric__
Guest
 
Posts: n/a

re: Date Time Difference...


On Tue, 01 Jan 2008 11:49:22 GMT, wrote:
Quote:
On Thu, 27 Dec 2007 20:54:02 -0500, Steve
<stevetheimacuser@aol.comwrote:
>
Quote:
>>I was wondering if someone could help me here. Since I'm running
>>and iMac, I don't have Visual Basic (6) installed. I want a small
>>function returns the number of seconds between two dates.
>>
>>Can anyone help me with this? I would appreciate it.
>
Are you wanting the VB function or just the number of seconds? If
the latter, set up a simple spreadsheet and you'll even be able to
format the result the way you want.
Since this is a VB group, and not a spreadsheet/excel/office/whatever
group, I think it's safe to assume that the OP wanted to do this
programmatically.

--
Stupid asshole.

--
Posted via a free Usenet account from http://www.teranews.com

Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
How calculate date/time difference in DB2 lenygold via DBMonster.com answers 4 September 2nd, 2008 09:22 PM
date time difference bbawa1@yahoo.com answers 3 June 16th, 2007 02:05 PM
How to find out a date/time difference Lad answers 2 May 24th, 2006 03:25 PM
compare date/time values in the same table akoper@web4000.com answers 5 July 20th, 2005 01:43 AM