rtos (getvar "cdate" )获取时间的问题
通常,通过函数(rtos (getvar "cdate" ) 2 6 )这样,可以获取年月日.时分秒。我有个疑问,如果我想获取得月日时分秒,而且不要那个小数点。怎样写代码?
(defun c:bb()
(setq time (rtos (getvar "Cdate")2 6))
(strcat (substr time 5 2) "月" (substr time 7 2) "日" (substr time 10 2) "时" (substr time 12 2) "分" (substr time 14 2) "秒")
) unclearriver 发表于 2022-1-30 18:19
(defun c:bb()
(setq time (rtos (getvar "Cdate")2 6))
(strcat (substr time 5 2) "月" (substr time ...
谢谢,问题解决了。 用这个
(menucmd "M=$(edtime,$(getvar,date),YYYYMODDHHMMSS)") 菜卷鱼 发表于 2022-2-9 09:14
用这个
(menucmd "M=$(edtime,$(getvar,date),YYYYMODDHHMMSS)")
嗯,你这个办法也不错。谢谢 不错的知识点!
页:
[1]