Results 1 to 4 of 4
  1. #1
    sd1130 is offline Novice
    Windows Vista Access 2010 32bit
    Join Date
    Nov 2011
    Posts
    2

    Date Field Help Please

    I am having issues with Date fields. I have a column that gives a just the date for some records, but others gives the date and the time. When I join this table with another table the dates with times excludes data and throws off my numbers. I thought the problem was fixed with converting the dates with the int command, however it did not pull over all the correct records. Now I have found another field in the table that has most of the data I need but contains nulls. My question is: How do I move data from the first column (we will call it m_datetime) to the column with the nulls (we will call it m_dateadd). Both column are in the same table, and I only want the data to be moved if m_dateadd is null. Any help would be greatly appreciated!



    Thank you

  2. #2
    Toyman is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    233
    Quote Originally Posted by sd1130 View Post
    I am having issues with Date fields. I have a column that gives a just the date for some records, but others gives the date and the time. When I join this table with another table the dates with times excludes data and throws off my numbers. I thought the problem was fixed with converting the dates with the int command, however it did not pull over all the correct records. Now I have found another field in the table that has most of the data I need but contains nulls. My question is: How do I move data from the first column (we will call it m_datetime) to the column with the nulls (we will call it m_dateadd). Both column are in the same table, and I only want the data to be moved if m_dateadd is null. Any help would be greatly appreciated!

    Thank you
    Please give more details as to what you are trying to do. You have one table with the date field. You want to link it with another table? If so, how are you linking the tables. Give more detail as to the make up of the tables and the final result you need

  3. #3
    sd1130 is offline Novice
    Windows Vista Access 2010 32bit
    Join Date
    Nov 2011
    Posts
    2
    I have a table with many fields, id_num, fname, lname, tin,..... m_datetime, m_dateadd. The data comes from our core system and when it comes to the m_datetime field for an unknown reason it places times with the dates. So sometimes data looks like 11/1/2011 and sometimes like 11/1/2011 16:00. My ultimate goal would be to link this table on the dates to another table (Table I). This table has a create date that when set equal to m_datetime should give me the data I need. However the time portion of the m_datetime creates a problem. The m_dateadd field has the correct format I am looking for, but is incomplete. What I want to do is find a way to move the values from m_datetime to m_dateadd, only when m_dateadd is null. Both columns are in the same table. I would just go to each record and copy but there are over 300,000 records and m_dateadd has over 75,000 records that are blank (null). Is it possible to create a temp table where the two columns are joined, displaying m_dateadd and inserting m_datetime where m_dateadd is null?
    Then I can use this new table to join to my other tables and hopefully get what I need.

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,850
    The data comes from our core system
    what exactly does this mean?
    What is the definition of m_datetime field does it have a default format?
    Not sure why it sometimes includes time? Unless there is a function or process of some sort that is doing something like
    m_datetime = format(SomeDateValue, "Long Date")

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

Similar Threads

  1. Getting Just the Date part of Date/Time field
    By GaryElwood in forum Reports
    Replies: 7
    Last Post: 09-28-2011, 09:58 AM
  2. Replies: 1
    Last Post: 02-06-2011, 06:36 PM
  3. Replies: 1
    Last Post: 11-13-2010, 12:57 PM
  4. Set date field on subform to date variable
    By laavista in forum Access
    Replies: 4
    Last Post: 06-30-2010, 06:32 PM
  5. set date field on form to date variable
    By laavista in forum Access
    Replies: 3
    Last Post: 06-28-2010, 03:03 AM

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