在msaccess中转换日期格式 [英] convert date format in msaccess

查看:93
本文介绍了在msaccess中转换日期格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在输出中我有28/1/2013格式的日期。



i想要将日期格式更改为28 jan。



如何在MS访问数据库中获取28 jan格式而不是在sql中。



i在MSAccess数据库中需要。



我该怎么办。



i尝试以下查询无效



选择CONVERT(varchar(11),Sch_Date,106)AS schDate,[Session],[Faculty_Code]来自Tb_SCh_TIme_Table



来自我的上述问题是我犯了什么错误。帮助我。我试过但没有得到28 jan输出。

in the out put i have date in the 28/1/2013 format.

i want to change the date format in to 28 jan.

how can i get the 28 jan format in ms access database not in sql.

i wanted in MSAccess database.

how can i do.

i try the below query is not working

select CONVERT(varchar(11), Sch_Date, 106) AS schDate, [Session],[Faculty_Code] from Tb_SCh_TIme_Table

from my above query what is the mistake i made.help me. i tried but not get the 28 jan ouput.

推荐答案

使用格式化功能: http://www.techonthenet.com/access/functions/date/format.php [ ^ ]



Use Format function: http://www.techonthenet.com/access/functions/date/format.php[^]

SELECT Format (Sch_Date, "dd\/mm\/yyyy")
FROM b_SCh_TIme_Table





请注意 \ 。您可以省略它,但如果这样做,系统本地可以覆盖它。



更新:

使用格式(D,dd mmm)获得28 jan格式。



Note the "\". You can omit it, but if you do, the system local could override it.

Update:
Use Format (D, "dd mmm") to get "28 jan" format.


这篇关于在msaccess中转换日期格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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