日期问题

ranliwei 2003-10-22 10:19:50
如何将表单中显示的格式由月、日、年变成年、月、日
...全文
78 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
mzzxy 2003-10-23
  • 打赏
  • 举报
回复
allt(str(year(date())))+'年'+allt(str(month(date())))+'月'+allt(str(day(date())))+'日'
dfwxj 2003-10-23
  • 打赏
  • 举报
回复
完善一下楼上的答案:

str(year(date()),4)+'年'+padl(allt(str(month(date()))),2,'0')+'月'+padl(allt(str(day(date()))),2,'0')+'日'
dfwxj 2003-10-22
  • 打赏
  • 举报
回复
set date ansi

搞定!
magnetmoon 2003-10-22
  • 打赏
  • 举报
回复
set date to ymd
?date()
set date to mdy
?date()
set date to dmy
?date()
fengyeng 2003-10-22
  • 打赏
  • 举报
回复
工具/选项/区域
日期格式
选择汉语就可以了
看完速给分!
noproblem12 2003-10-22
  • 打赏
  • 举报
回复
set date YMD
noproblem12 2003-10-22
  • 打赏
  • 举报
回复
SET DATE Command
See Also

Specifies the format for the display of Date and DateTime expressions.

Syntax

SET DATE [TO] AMERICAN | ANSI | BRITISH | FRENCH | GERMAN
| ITALIAN | JAPAN | USA | MDY | DMY | YMD
| SHORT | LONG

Remarks

Here are the settings and the resulting date formats:

Setting Format
AMERICAN mm/dd/yy
ANSI yy.mm.dd
BRITISH/FRENCH dd/mm/yy
GERMAN dd.mm.yy
ITALIAN dd-mm-yy
JAPAN yy/mm/dd
USA mm-dd-yy
MDY mm/dd/yy
DMY dd/mm/yy
YMD yy/mm/dd
SHORT Short date format determined by the Windows Control Panel short date setting.
LONG Long date format determined by the Windows Control Panel long date setting. Note that when SET DATE is set to LONG, dates before {^1601-01-01} that are converted to character strings are returned as the empty date.


The default date setting is AMERICAN.

The SET DATE setting also determines how the date appears in datetime expressions.

If DATE is set to SHORT or LONG, the SET CENTURY, SET MARK, SET HOURS, and SET SECONDS settings are ignored.

SET DATE is scoped to the current data session.
taoyb 2003-10-22
  • 打赏
  • 举报
回复
set date ansi (年。月。日)
set cent on (四位年份)


heavenmusic 2003-10-22
  • 打赏
  • 举报
回复
找一个VFP8。0帮助,看一下吧!。。。。。。WWW.VFP.CN里面有下载的!!

基础问题,,,一般书上都有的!!!

2,749

社区成员

发帖
与我相关
我的任务
社区描述
VFP,是Microsoft公司推出的数据库开发软件,用它来开发数据库,既简单又方便。
社区管理员
  • VFP社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧