+ Reply to Thread
Results 1 to 8 of 8

Pull records that started and finished on the same day?

  1. #1
    Registered User
    Join Date
    07-18-2006
    Posts
    73

    Pull records that started and finished on the same day?

    There are two different fields that are included in a database, one is Actual Start Date, the other is Actual Finish Date.

    The field includes a time and date such as
    2006-09-07 10:03:45.060

    Is there a way to set it up so that it only pulls records that have an Actual Start and Actual Finsih time that are on the same day? I know the time is included, but I want to disregard time in the query.

    I would figure I could somehow setup the query like this, I'm not sure how though, since I want it to only look at the day.

    Thanks,

    ~J

  2. #2
    Forum Contributor stevebriz's Avatar
    Join Date
    09-07-2006
    Location
    Santiago Chile
    Posts
    389

    Finding records of same start and finish date

    This can certainly be done..
    what or where do you want to put these records?
    eg:
    Do you just want to hide the rows that are don't match?

  3. #3
    Forum Contributor stevebriz's Avatar
    Join Date
    09-07-2006
    Location
    Santiago Chile
    Posts
    389
    Here is a macro that will hide rows that don't have mathching dates..

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    07-18-2006
    Posts
    73
    I think I worded it wrong. I really only have to base it on the Actual Duration column, which is the column that I have setup in the format d-h:mm

    I just need it to go through every record and only show the records that have a 0 as the d. I just need it to delete the rest.

    Would the code still do that?

    Sorry about that and thanks!

    ~J

  5. #5
    Forum Contributor stevebriz's Avatar
    Join Date
    09-07-2006
    Location
    Santiago Chile
    Posts
    389
    which column is you duration?

  6. #6
    Forum Contributor stevebriz's Avatar
    Join Date
    09-07-2006
    Location
    Santiago Chile
    Posts
    389
    This is assuming you durations is in col b rows 2-40..you can change this as needed.

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    07-18-2006
    Posts
    73
    Duration is in the 'E' Column. The data in that column actually starts in E4

    The first column with Data in it is column C and there are columns all the way till column N. The data starts on the 4th row.

    Thanks again for helping me!

    ~J

  8. #8
    Forum Contributor stevebriz's Avatar
    Join Date
    09-07-2006
    Location
    Santiago Chile
    Posts
    389
    This will look at column E for rows 4 to 400 ( change the 400 in you like.. in line For i = 4 To 400 ...it delete the eniter row if not there is duration is not 0 days


    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1