Results 1 to 6 of 6
  1. #1
    Middlemarch is offline Competent Performer
    Windows 10 Access 2019
    Join Date
    Mar 2015
    Posts
    365

    Minute and Second

    The example I have is = Second (#10:13:58 AM#) and the argument must be a valid time.
    But what if the numbers are strings? How could it be formatted to avoid a Type Mismatch error?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Possibly convert with CDate() function.
    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
    Middlemarch is offline Competent Performer
    Windows 10 Access 2019
    Join Date
    Mar 2015
    Posts
    365
    I though of that too. Did it work for you ?

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    You did not try?

    VBA immediate window:

    ?IsDate(CDate("10:13:58 AM"))

    returns True
    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.

  5. #5
    Middlemarch is offline Competent Performer
    Windows 10 Access 2019
    Join Date
    Mar 2015
    Posts
    365
    Thanks June I have it now.

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Be aware conversion functions error if input is Null. If that is possibility, can handle Null with Nz()

    CDate(Nz(field,0))
    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.

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

Similar Threads

  1. Grouping by 15 minute periods
    By Sanguineus in forum Queries
    Replies: 5
    Last Post: 12-24-2018, 02:57 AM
  2. Hour Minute Format not time specific
    By jungmanish in forum Access
    Replies: 5
    Last Post: 05-06-2018, 03:46 AM
  3. Last minute requests SOS
    By Forbes in forum Reports
    Replies: 6
    Last Post: 03-16-2017, 02:57 PM
  4. Combining data within minute
    By JGtz in forum Queries
    Replies: 2
    Last Post: 01-28-2016, 02:47 PM
  5. Replies: 10
    Last Post: 10-19-2015, 06:15 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