1
獲得郵戳至於我可以跟以下功能什麼是可用的,它們都依賴於系統的日期/時間設置:在已知的格式
GetTime()
GetDate()
DateStamp()
GetCurrentTime().FormatTimeString()
這結果使得對漂亮的時間戳窗口,但是將時間戳放入文件名中確實存在問題。有沒有一種命令能以獨立於系統的格式給我日期和時間,還是我需要編寫一些瘋狂的函數來自己完成它?
獲得郵戳至於我可以跟以下功能什麼是可用的,它們都依賴於系統的日期/時間設置:在已知的格式
GetTime()
GetDate()
DateStamp()
GetCurrentTime().FormatTimeString()
這結果使得對漂亮的時間戳窗口,但是將時間戳放入文件名中確實存在問題。有沒有一種命令能以獨立於系統的格式給我日期和時間,還是我需要編寫一些瘋狂的函數來自己完成它?
您是否檢出了幫助文檔「實用功能」一節中提供的命令?特別是對於
String FormatTimeString(Number time, Number format)
的參數,或者如果你想建造的東西「瘋狂」,這可能是有幫助的:
void DeconstructLocalGregorianDate(Number time, NumberVariable year, NumberVariable month, NumberVariable day, NumberVariable hour, NumberVariable minute, NumberVariable second, NumberVariable nanosecond)
您可以使用它像以下示例:
Number year, month, day
Number hour, minute, second, nanosecond
GetCurrentTime().DeconstructLocalGregorianDate(year, month, day, hour, minute, second, nanosecond)
string myFormat = year+"_"+month+"_"+day+"--"+hour+"-"+minute+"-"+second
OKDialog(myFormat)
我做了一個for循環0到255作爲參數是,它似乎所有人都遵循系統設置。正是當我來到這裏時,文檔,手冊和創造力耗盡了;)但是現在你認爲解構功能確實使「瘋狂」解決方案變得相當容易。再次感謝 :) – LinusSch