formatdatetime('hh:nn',hr_min);和formatdatetime('hh:mm',hr_min);
解决方案 »
- 关于数据库有空格符的问题,怎么办
- 想做一个类似大头贴的软件,不知道如何将图像框和头像的合并
- 请教一个简单的取字符写法?(在线等)
- 问一个简单的SQL问题
- 在FastReport中,怎么样实现把下一页打在上一页的背面?
- 递归函数,出现问题
- 郁闷散分...在线
- FasterReport2.47安裝密碼是什麼?
- 极难问题!!!
- delphi Tchart中使用Tpointseries 画点状图,如何改变点的形状,如圆点,叉号,小三角...
- 为什么我做了一个client和server用socket连接的,在本机上是正确的,我将client放到网内其它机器上,无法运行client?
- 请教关于数据库编号问题
mm Displays the month as a number with a leading zero (01-12). If the mm specifier immediately follows an h or hh specifier, the minute rather than the month is displayed.
hh Displays the hour with a leading zero (00-23).
nn Displays the minute with a leading zero (00-59).
Date-Time Format Strings
如果硬要说区别的话,就是为了怕表示月的mm和表示分的mm混淆而想出的缓解办法
如果你把mm或者nn换成dd的话你会发现发现小时后面跟的是当天的日期
而
showmessage(formatdatetime('yyyy-mm-dd hh:nn:ss',now))
和
showmessage(formatdatetime('yyyy-mm-dd hh:mm:ss',now))
显示的结果是一样的