• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

prompt中怎么显示日期

mysql 搞代码 7年前 (2018-06-02) 149次浏览 已收录 0个评论

prompt中如何显示日期?
看了一下帮助,貌似没有“日”?

Option Description 
/c A counter that increments for each statement you issue 
/D The full current date 
/d The default database 
/h The server host 
/l The current delimiter 
/m Minutes of the current time 
/n A newline character 
/O The current month in three-letter format (Jan, Feb, …) 
/o The current month in numeric format 
/P am/pm 
/p The current tcp/IP port or socket file 
/R The current time, in 24-hour military time (0–23) 
/r The current time, standard 12-hour time (1–12) 
/S Semicolon 
/s Seconds of the current time 
/t A tab character 
/U Your full user_name@host_name account name 
 
/u Your user name 
/v The server version 
/w The current day of the week in three-letter format (Mon, Tue, …) 
/Y The current year, four digits 
/y The current year, two digits 
/_ A space 
/ A space (a space follows the backslash) 
/’ Single quote 
/" Double quote 
// A literal “/” backslash character 
/x x, for any “x” not listed above 
 

——解决方案——————–
哇,lz 真细心,我找了中文帮助也没看到有:

选项 描述
/v 服务器版本
/d 当前的数据库
/h 服务器主机
/p 当前的TCP/IP端口或套接字文件
/u 你的用户名
/U 你的全user_name@host_name账户名
// ‘/’反斜线字符
/n 新行字符
/t Tab字符
/ 空格(反斜线后面的空格)
/_ 空格
/R 当前的时间,24-小时军用时间(0-23)
/r 当前的时间,标准12-小时(1-12)
/m 当前时间的分钟
/y 当前的年,两位
/Y 当前的年,四位
/D 当前的日期
/s 当前时间的秒
/w 当前周的天,3字符格式(Mon,Tue,…)
/P am/pm
/o 当前的月,数字格式
/O 当前的月,3字符格式(Jan,Feb,…)
/c 随发出的每个语句递增的计数
/S 分号
/’ 单引号
/" 双引号
——解决方案——————–
只有加入大写的D
>prompt /Y/D/u@/h(/d) /r:/m:/s>
——解决方案——————–
没有办法,没有其它选项


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:prompt中怎么显示日期
喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址