lisp 判斷時間

xm0420發表於2020-12-19
                                         lisp          判斷時間

		       (setq sjdata (rtos (getvar "cdate") 2 0))
                      ;新增時間判斷如果時間是凌晨0點到5點,該時間為前一天
		       (setq sjdata0 (atof(rtos (getvar "cdate") 2 0)));取年月日
		       (setq sjdata4 (atof(rtos (getvar "cdate") 2 4)));取年月日時分

                      (if (< (- (atof(rtos (getvar "cdate") 2 4)) (atof(rtos (getvar "cdate") 2 0)))  0.07 )


                          (setq sjdata1 (strcat gcdh "  " (rtos (- sjdata0 1))))

			
			  (setq sjdata1 (strcat gcdh "  " sjdata))

		      )

相關文章