Display SQL time field on Access form as Access medium time hh:mm am/pm

前端 未结 2 2007
清酒与你
清酒与你 2021-01-26 20:08

I am using Access 2010 linked to SQL Server 2008 R2. My problem - how do I display time on an Access form as hh:mm am/pm instead of SQL Server\'s time(7) format of

2条回答
  •  無奈伤痛
    2021-01-26 20:25

    Sorry, I don't have a dev environment setup, but can you change your SQL query to:

    SELECT Convert(varchar(5), getdate(), 108) 
    

    to give HH:MM and truncate the rest so it displays correctly.

    Then, you can cast as date on the way back.

提交回复
热议问题