SQL日期格式显示后跟后缀的数字日期值

问题描述

我想编写一个查询,以这种格式显示今天的日期“ 2020年10月7日”,所以我编写了此查询

<service android:name=".BackgroundAudioNotificationService" android:exported="true"> <intent-filter> <action android:name="android.media.browse.MediaBrowserService" /> <action android:name="android.intent.action.MEDIA_BUTTON" /> <!-- Tried to do "Play X" while running in Android Auto,and this didn't work --> <action android:name="android.media.action.MEDIA_PLAY_FROM_SEARCH" /> </intent-filter> </service>

但是输出显示我是2020年10月 07th 。有什么办法让我不显示7号之前的0?

解决方法

我想你想要

SELECT TO_CHAR(sysdate,'fmMonth dTH "of year" YYYY') as "next day" 
FROM dual

单个dTH完成该组件所需的功能。前导fm删除了该月的填充。

您可以查看结果here

,

好的。 FM

SELECT  TO_CHAR(sysdate,'Month fmDdTH "of year" YYYY') as "next day" from dual
                               ^^
                               this

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...