Results 1 to 4 of 4
  1. #1
    BADebbie is offline Advanced Beginner
    Windows 8 Access 2010 64bit
    Join Date
    Jul 2015
    Posts
    33

    Delete a column of Dates

    I have a column in my query that is for a date. The dates have all passed and I would like to delete these dates, but keep the column. I will be putting dates in there again in 2016. Is there a way to do some type of mass delete or update for this column or cells in the column?

    Example

    Q3 Zero Harm Lunch
    11/24/2015
    11/24/2015
    11/24/2015
    11/24/2015
    11/24/2015
    11/24/2015
    11/24/2015
    11/24/2015

    11/24/2015
    11/12/2015
    11/12/2015
    11/12/2015
    11/12/2015
    11/12/2015
    11/12/2015
    11/12/2015
    11/12/2015
    11/12/2015
    11/24/2015




    11/19/2015
    11/19/2015
    11/19/2015
    11/19/2015
    11/19/2015
    11/19/2015
    11/19/2015
    11/19/2015
    11/19/2015
    11/24/2015
    11/12/2015
    11/12/2015
    11/12/2015
    11/12/2015
    11/12/2015
    11/24/2015
    11/24/2015
    11/24/2015
    11/24/2015
    11/12/2015
    11/24/2015
    11/24/2015
    11/12/2015
    11/12/2015
    11/12/2015
    11/12/2015
    11/24/2015
    11/24/2015
    11/24/2015
    11/24/2015
    11/12/2015
    11/19/2015
    11/24/2015
    11/12/2015
    1/1/1900
    11/18/2015
    11/12/2015
    11/24/2015
    11/24/2015
    11/12/2015
    11/12/2015
    11/12/2015
    11/12/2015
    11/24/2015
    11/18/2015
    11/19/2015
    11/12/2015
    11/18/2015
    11/12/2015
    11/12/2015




    11/18/2015
    11/18/2015
    11/12/2015
    11/18/2015
    11/18/2015
    11/18/2015
    11/18/2015
    11/18/2015
    11/18/2015
    11/18/2015
    11/18/2015
    11/18/2015
    11/18/2015
    11/18/2015
    11/18/2015
    11/18/2015
    11/18/2015
    11/18/2015





  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Can run a DELETE sql action.

    DELETE FROM tablename WHERE [fieldname] < Date();

    Use Access query builder.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    pervezjan is offline Novice
    Windows XP Access 2003
    Join Date
    Sep 2012
    Posts
    12
    It is simple just Replace the Date column with 2016. If you need column just replace with null

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    SQL DELETE is for deleting records.
    If you just want to change the date from, say 2015 to 2016, then use an UPDATE query
    Code:
    UPDATE MyTable
    SET MyDateField = 2016
    WHERE MyDateField = 2015
    More info on SQL DELETE

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Delete column before export
    By xopherira in forum Access
    Replies: 7
    Last Post: 08-06-2015, 12:54 PM
  2. Replies: 3
    Last Post: 07-14-2013, 08:24 PM
  3. Replies: 2
    Last Post: 02-23-2012, 12:23 PM
  4. Delete first row and Column for excel import
    By kazman101 in forum Import/Export Data
    Replies: 1
    Last Post: 07-18-2011, 06:53 AM
  5. Can't delete a column (field)
    By jlmnjem in forum Access
    Replies: 2
    Last Post: 09-20-2010, 12:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums