2022.2

Table Of Contents
Date
TheDateelementinsertsthecurrentsystemdate,optionallymakingitdynamicsothatitupdates
wheneverthetemplateisviewedorproducesoutput.
Addingadate
ToaddaDateelement,usetheInsert > Dateoptioninthemenus.Adialogappearswiththefollowing
controls:
l
Language:Usethedrop-downtoselectwhichlanguagethedateshouldbedisplayedin.
l
Update Automatically:Checktoupdatethedateautomaticallywhenthetemplateisviewedor
producesoutput.Whenthisoptionischecked,aplaceholderisinsertedinthetemplateanda
scriptiscreatedtoupdateitautomatically,otherwiseastatictextwiththedateisinserted.
l
Available Formats:Selectthedate/timeformatinwhichtodisplaythedate.
ClickOKtoinsertthedateorCanceltoclosethedialog.
Tip: Ifyouarelookingtoaddadatethatoriginatesfromarecordset,toatemplate,see:"Vari-
abledatainthetext"onpage708.Toinsertadateyoucoulduseeitherthedraganddrop
methodortheWizard;thelatterletsyousetthedate/timeformat.
Changingthedate
Onceinserted,adatecanbemodifieddirectlyinthetemplate(ifitdoesnotupdateautomatically)or
throughthedatescript(ifitdoesupdateautomatically).Tomodifythedateinthescript:
1. Double-clickthedatescriptintheScriptspane.
2. BetweentheroundbracketsafterDate,enterthedesireddateinthefollowingorder:year,month,
day,andoptionallyhours,minutes,seconds,milliseconds(seehttps://www.w3schools.-
com/js/js_dates.aspandhttps://developer.mozilla.org/en-US/-
docs/Web/JavaScript/Reference/Global_Objects/Date.)Whenthetimeisomitted,itdefaultsto
12:00:00AM.
Formattinganautomaticallyupdatingdate
Thescriptaddedtoautomaticallyupdatethedateusestheshortdateformat.Tochangethis:
1. Double-clickthedatescriptintheScriptspane.
2. Deletethefirstlineofthescript.
3. Onthesecondline,deletewhatcomesafterformatandchangeformattoformatter(see
"formatter"onpage1175).
Page 639