我想在PowerBuilder中格式化日期时间
我想以特定格式显示日期和时间,如下所示:
“yyyy/mm/dd hh:mm”
但是,我得到的输出为“mm/dd/yyyy hh:mm:ss”
我尝试使用 < code>edit.mask 属性如下:
column(band=detail id=9alignment="0" tabsequence=32766 border="0" color="0" x="300" y =“450”高度=“100”宽度=“1449”格式=“[短日期] [时间]”html.valueishtml=“0”名称= record_create_tms可见=“1〜tif(isnull(record_create_tms),0,1 )" edit.limit=0 edit.case=any edit.autoselect=yes *edit.mask="YYYY/MM/DD HH:MM"* edit.imemode=0 font.face=“Arial” font.height=“-12” font.weight=“400” font.family=“2” font.pitch=“2” font.charset=“0”background.mode=“2” background.color="12632256" )
但当我尝试保存它时,它显示语法错误。请告知如何实现我的输出?
I want to display the date and time in a particular format as below :
"yyyy/mm/dd hh:mm"
But, I am getting the output as "mm/dd/yyyy hh:mm:ss"
I tried using the edit.mask
property as follows :
column(band=detail id=9 alignment="0" tabsequence=32766 border="0" color="0" x="300" y="450" height="100" width="1449" format="[shortdate] [time]" html.valueishtml="0" name=record_create_tms visible="1~tif(isnull(record_create_tms),0,1)" edit.limit=0 edit.case=any edit.autoselect=yes *edit.mask="YYYY/MM/DD HH:MM"* edit.imemode=0 font.face="Arial" font.height="-12" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="12632256" )
But it is showing me syntax error when I try to save it. Please advise how to achieve my output?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您对用于显示数据的数据格式和输入数据时使用的编辑掩码感到困惑> 版本中。
我可以在您粘贴的代码中看到您更改了
edit.mask
但format
仍然是[shortdate] [time]
。将控件属性的
Format
选项卡页中的Format
属性更改为yyyy/mm/dd hh:mm
,它应该可以工作。You are confused between the data format that is used to display data and the edit mask that is used when entering data in edition.
I can see in the code you pasted that you changed the
edit.mask
but theformat
is still[shortdate] [time]
.Change the
Format
property from theFormat
tab page of the control properties toyyyy/mm/dd hh:mm
and it should work.