Results 1 to 2 of 2
  1. #1
    swaroop1012 is offline Novice
    Windows XP Access 2002 (version 10.0)
    Join Date
    Nov 2008
    Posts
    2

    problem in splitting Date and time fields


    I have a database where there is a field "date time" and some of the entries of this field have the time and some don't. I wrote a query to display them.my job is to split them into two seperate fields of date and time. I used the commands

    Date: Left([RECEPD],Instr([RECEPD]," ")-1)
    Time: Mid([RECEPD],InStr([RECEPD]," ")+1)

    where RECEPD is the actual field name for "date time".
    Here i got a problem which is the entries with both time and date worked fine but the ones with only date gave error (like #Error) in the date field and displayed the date in the time field. can any one pls suggest me any ideas to overcome this problem. I need the solutions a bit quick as my deadline is approaching. thanks in advance.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,923
    Here's a link that should help to explain the DateTime field.
    http://support.microsoft.com/default.aspx/kb/q130514/

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

Similar Threads

  1. Date and time serch
    By gayano in forum Programming
    Replies: 1
    Last Post: 08-31-2007, 03:49 AM
  2. Time and date serch
    By gayano in forum Access
    Replies: 0
    Last Post: 07-05-2007, 07:59 PM
  3. date/time field
    By James890 in forum Database Design
    Replies: 1
    Last Post: 04-18-2007, 07:51 AM
  4. Access Date/Time....I need a "generic" date.
    By beastmaster in forum Access
    Replies: 2
    Last Post: 12-29-2005, 12:55 PM
  5. date/time number
    By playfuljade in forum Forms
    Replies: 4
    Last Post: 12-19-2005, 12:52 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 - Senior Forums