Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tim Tim is offline
external usenet poster
 
Posts: 408
Default Trying to SUM up a DATE/TIME field in code...

I'm connecting to an Access Database using ADODB and would like to sum up the
total values for a Date/Time field called Duration.

The SQL I'm using to get this is: "SELECT SUM(Duration) FROM 3_REPORT;"

I am using Excel as my interface and when I run this SQL it returns this
value: "1.6937569511234E+190" regardless of how I format the cell. I was
expecting something like 24:14:01.

If I just cut and paste my data from Access into Excel, then use the excel
function so sum up the total duration, then it gives me what I want. I would
like to do this in the code though.

Any ideas what I'm doing wrong, or how to get around this?

Thanks in advance.

Tim
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you combine a date field and a time field into one? Janet Kreinbrink[_2_] Excel Worksheet Functions 6 November 10th 09 04:31 PM
removing/ignoring time in a date time field Jeff Excel Discussion (Misc queries) 2 July 18th 08 07:35 PM
Trying to SUM up a DATE/TIME field in code... Rone[_2_] Excel Programming 0 March 15th 06 10:20 PM
How to Join/concatenate a date field with a time field in Excel? Alan Excel Discussion (Misc queries) 4 August 9th 05 10:07 PM
Remove time from a date and time field? Format removes the displa. oaoboc Excel Worksheet Functions 1 February 16th 05 07:20 PM


All times are GMT +1. The time now is 04:47 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"