Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2003

    Unanswered: VB Date to MS Access Short Time

    Hello all,

    I've been browsing the posts regarding Time formats in Access, but I haven't found an answer to my problem, so I hope someone will be able to help.

    Here's the issue:
    In a VB.Net form, the user enters a Time. That time is contained within a variable of type Date.

    I need to add the time to a ShortTime in an Access 2000 DB.

    I've tried the following (sTime is the variable of type Date):
    "#" & FormatDateTime(sTime, DateFormat.ShortTime) & "#"
    "#" & sTime & "#"

    I've also tried it without the # symbols.
    No matter what I do, the time is saved in Access as 00:00

    FormatDateTime(sTime, DateFormat.ShortTime) produces the proper time (ie. 02:00) but it won't save as that in Access.

    I'm using Time as a 24 hour clock. Not sure if that makes a difference.

    Any assistance would be appreciated.


  2. #2
    Join Date
    May 2003
    Provided Answers: 5
    this may go back to the problem of regional settings in control panel

    I know there were issues with date formats regardless of the format issued by vb in access. Check the regional settings and see if changing them helps.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts