Results 1 to 7 of 7
  1. #1
    johnseito is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2013
    Posts
    419

    merge two column with date and time

    Hi

    How do you merge two columns together, one is the date, and another is the time.

    date column as this 9/21/13


    time column as this 11:01:00 am

    the reason why I want to merge it is because so I don't have to retype and I would have both the date and time in one filed.
    Date and time column are both Date/Time type.

    Thank you!!!

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    Add them together.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    How did the data get input to the table? Maybe the time is in the date field or the date is in the time field.

    You can check by opening your table and copying one of the values. Then you can paste it into an unbound textbox in a test form. Just format the textbox to show the date and time first.

  4. #4
    johnseito is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2013
    Posts
    419
    Quote Originally Posted by ItsMe View Post
    How did the data get input to the table? Maybe the time is in the date field or the date is in the time field.
    It is enter manually. The date and time field is data type Date/Time. I see it as this when I go to design view.

    You can check by opening your table and copying one of the values. Then you can paste it into an unbound textbox in a test form. Just format the textbox to show the date and time first.
    Why do this? I only want a easy way to put these two together, where one field has date and the other has time. I am doing it by retyping it over. But
    is there are quicker way. For example in excel, if you want to concatenate two values together CONCATENATE (text1,text2,...)

  5. #5
    johnseito is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2013
    Posts
    419
    Quote Originally Posted by pbaldy View Post
    Add them together.
    This is not a manipulated table (query) it is a table that is inputted, no SQL code involved in the creation of this table.

  6. #6
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    Quote Originally Posted by johnseito View Post

    Why do this?
    Because in tables with date/time fields that get the field updated using the now function often have the date and time stored in the field, regardless if the field is format long date, short time, etc. At least that is how it is in 2003. I thought it was worth a shot.

    I suppose it would have been easier for me to ask you to adjust the date and time columns really really wide and click inside the different fields. Sorry about that. I tried to avoid adjusting tables if at all possible as a habit.

  7. #7
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    So use an update query to update one of those or a third field...by adding them together.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 1
    Last Post: 05-21-2013, 12:02 PM
  2. Replies: 4
    Last Post: 03-06-2013, 02:32 PM
  3. Replies: 2
    Last Post: 08-12-2012, 10:56 AM
  4. Replies: 6
    Last Post: 01-04-2011, 05:43 PM
  5. Replies: 1
    Last Post: 04-15-2010, 02:07 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