Hello Indigorose forums ! I have a another question for you :
How to get the date in AMS ?
Exemple :
date=System.Getdate()
if date==1 then
Dialog.Message("Today is", "Monday");
end
Thank you in advance !
Professional Software Development Tools
Hello Indigorose forums ! I have a another question for you :
How to get the date in AMS ?
Exemple :
date=System.Getdate()
if date==1 then
Dialog.Message("Today is", "Monday");
end
Thank you in advance !
On my system anyway...Code:dow = System.GetDate(DATE_FMT_DAYOFWEEK); if dow == "2" then today = "Monday" end Dialog.Message("Notice", "Today is " .. today, MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
or simply
Code:local dow = os.date("Today is %A") Dialog.Message("Notice", dow)
Dermot
I am so out of here
Or ...
Assuming you use the European Date Format (Reunion Island is French heritage, yeh?) ... then concatenate Dermot's example with DATE_FMT_EUROPE
eg.
Code:local day = os.date("%A"); date = System.GetDate(DATE_FMT_EUROPE); Dialog.Message("Date Function", day .. "\r\n" .. date);
Or, you could even use AMSWave's Script plugin. Download from:
AMSWaves Script Plugin
View his original Post for this plugin at:
http://www.indigorose.com/forums/sho...d.php?p=128185
Use this code with the plugin:
Code:code =[[result = Date() + Time()]] Script.AddCode(code, Script_InternalCode); date = Script.GetResultAsDate("result"); Dialog.Message("Date & Time", Script.FormatDate(date, "Date: %yyyy.%mm.%dd\r\nTime: %hh:%ii:%ss"))
Last edited by mystica; 08-17-2009 at 07:59 AM.
cool ... thanx for that, Dermot