+ Reply to Thread
Results 1 to 5 of 5

Access 2010 Date and time Macro

  1. #1
    Registered User
    Join Date
    09-22-2013
    Location
    New England
    MS-Off Ver
    Excel 2007, 2010 & 2013
    Posts
    24

    Access 2010 Date and time Macro

    I have data that is imported/dumped into my Access 2010 data base using the “dd mmm yyyy hh:nn” format. 95% of the data imported comes in with the hh:nn as 00:00 which is what I need. However, the remaining 5% comes in with random times, 09:54 or 22:11. Those random times causes problems down the line with my tables and charts. I’ve been editing that 5% manually for a long time. It’s time consuming and labor intensive. I’ve been trying to figure out a macro for just as long but cannot.

    I’m not good with macros and looking for some ideas. I know date and times are taboo so I’m not sure if this is possible.

    Thank you in advance, MP

  2. #2
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Access 2010 Date and time Macro

    DO you need a macro? If theyre in a table then you really should just use an UPDATE statement to change them.

    What is the format of the field they are stored in?
    If someone has helped you then please add to their Reputation

  3. #3
    Registered User
    Join Date
    09-22-2013
    Location
    New England
    MS-Off Ver
    Excel 2007, 2010 & 2013
    Posts
    24

    Re: Access 2010 Date and time Macro

    That is much easier to use. Thanks. I was able to do just that except I can't figure out the correct date and time format. dd mmm yyyy hh:nn is the format and I just need to change the times and leave the dates alone.

    I was able to update the times to 00:00 but it also changed the dates of 71K records to all the same. Opps. Good thing it was a copy. Make another and start over.

  4. #4
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Access 2010 Date and time Macro

    What is the field type though? Is it a date format? a Long? or text?

    If its text then update all the records with LEFT([your fieldname],12) & "00:00"
    If its a Long value (as dates should be stored) then I believe that rounding the value DOWN to 0 places will also set the time to 00:00

  5. #5
    Registered User
    Join Date
    09-22-2013
    Location
    New England
    MS-Off Ver
    Excel 2007, 2010 & 2013
    Posts
    24

    Re: Access 2010 Date and time Macro

    Right, Date and time.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Converting a julian date and time to standard date in excel 2010
    By Munkle555 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-22-2015, 10:49 AM
  2. [SOLVED] Modify Excel 2010 Quick Access Toolbar Macro Icon using VBA
    By unhappyCamper in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-12-2014, 11:46 AM
  3. Excel 2010, Access 2010, SQL Insert and Update Statments and NULL value in Field
    By jmmach72 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-24-2013, 02:35 PM
  4. [SOLVED] Access to Edit Macro prohibited in Excel 2010
    By ybortony in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-29-2013, 02:12 AM
  5. Using DAO to pull data from Access 2010 into an Excel 2010 table
    By Ragnaros in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-23-2013, 01:28 PM
  6. Saved file from Excel 2000 to 2010 format and lost some Macro access
    By JO505 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-26-2013, 11:48 AM
  7. Removing time from date/time data - Excel 2010
    By Huzzah in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-04-2011, 12:03 PM

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