将月份号码转换为月份名称 [英] convert month number to month name

查看:108
本文介绍了将月份号码转换为月份名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看到以前的解决方案将月份数字(1)转换为月份名称(1月份)。我有一个200多个日期的数据库。在查询中,我使用部分函数DatePart(m,[full_date]),用于提取月份(数字)和所有月份提取功能正常工作(它们返回正确的数字月份)。但是,当我尝试在查询中添加字段以将提取的月份格式化为月份名称时,它仅返回1月和12月 - 对于所有200多条记录。我做错了什么,我怎样才能正确地显示月份名称。


谢谢

I saw previous solutions to convert a month number (1) to a month name (January). I have a database with 200+ dates. In a query, I use the "Part" function DatePart("m",[full_date]), to extract the month (number) and all month extracts worked correctly (they returned the correct numerical month). However, when I attempted adding a field in the query to format that extracted month to a month name, it only returned January and December - for all 200+ records. What did I do wrong and how can I correctly get the month name to appear.

thanks

推荐答案

Be Borth,


您需要向我们展示您的所作所为,而不仅仅是告诉我们,以便我们对其进行审核并提供可能的解决方案。


-AJ
Be Borth,

You need to show us what you did, not just tell us, so that we can review it and offer up a possible solution.

-AJ


感谢AJ - 我很高兴这样做,但数据库中包含很多个人信息(姓名,生日等),我会觉得不舒服公共网站。有什么建议吗?

ben
Thanks AJ - I''m happy to do that, but the database contains a lot of personal information (names, birthdates, etc) that I would be uncomfortable posting on a public website. Any suggestions?
ben


我需要看的是你用来转换日期的功能。也许你的DatePart函数以及你用来将DatePart转换为日期名称的任何东西。只需复制并粘贴到主题中,请注意,发布代码时请使用[code]括号。


-AJ
All I need to see is the function you are using to convert the date. Perhaps your DatePart function along with whatever you are using to convert the DatePart to a date name. Just copied and pasted into the thread, also note, please use the [code] brackets when posting code.

-AJ


这篇关于将月份号码转换为月份名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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