从MS Access数据库中仅选择(或检索)日期 [英] Select (or Retrieve) only Date from Ms Access Database

查看:81
本文介绍了从MS Access数据库中仅选择(或检索)日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

在我的数据库中,我将谷歌以DateTime格式存储...
在前端,我只需要查看日期...



我需要写什么查询?

在SQL中,使用的是这样的

Hi every one,

in My Database i stored the vale in DateTime format...
in Front end i need to view only the date...



What query i need to write?

in SQL am using like this

SELECT convert(varchar,DOB,103)as DOB FROM Tbl_Employee



但是在MS Access中我该如何写?

怎么可能...


在此先感谢...



but in MS Access how i need write?

How is it possible...


Thanks in advance...

推荐答案

查看FORMAT函数:
Look at the FORMAT function: http://www.techonthenet.com/access/functions/date/format.php[^]

SELECT FORMAT(DOB, "dd/mm/yyyy") AS DOB FROM Tbl_Employee


这篇关于从MS Access数据库中仅选择(或检索)日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆