< Back

Document Subject: Useful Problem Solving button regarding date time and currency setup
Hint Short Cut: Add this to your code & documentation to help you find this page.
http://#Settings or http://A555F9/nn.nsf/ByAlias/Settings

When sorting out user's problems it can be useful to see what their machine is setup like. Date format, time separators and currency symbols can all create errors or unexpected results.




Stick this code in a lotus script button.

Change the first line to include your or the support desk's email address.

OptionalMailDest = "Notes Development"

Dim session As New notessession

Dim international As NotesInternational
Set international = session.International
If international.IsDateDMY Then
order= "Date order is DMY"
Elseif international.IsDateMDY Then
order = "Date Order is MDY - Change it! "
Elseif international.IsDateYMD Then
order = "Date Order is YMD - Change it! "
Else
order= "Date Order is Unknown - Contact Notes Support! "
End If

Dim timenow As New notesdatetime("")
timenow.setNow

order=order & Chr(10) & "Date Separator: " & international.DateSep
order=order & Chr(10) & "Time Separator: " & international.TimeSep
order=order & Chr(10) & "AM: " & international.amstring
order=order & Chr(10) & "PM: " & international.pmstring
order=order & Chr(10) & "24h: " & international.istime24hour
order=order & Chr(10) & "Timezone: " & international.timezone & " (GMT=0)"
order=order & Chr(10) & "Surrency: " & international.currencysymbol
order=order & Chr(10) & "Daylight Savings: " & timenow.Isdst
order=order & Chr(10) & "Zone time: " & Format$(timenow.zonetime , "Short Time" )
order=order & Chr(10) & "Local time: " & timenow.localtime


answer = Messagebox (order & Chr(10) & Chr(10) & "Do you want to send this to """ & _ OptionalMailDest & """ ?", 36, "International set up for" & sesssion.commonusername)


If answer=6 Then
Dim mdoc As notesdocument
Set mdoc = New notesdocument(session.currentdatabase)
mdoc.form="Memo"
mdoc.Subject="International settings from " & session.commonusername
mdoc.Sendto=OptionalMailDest
mdoc.Body=order
Call mdoc.send(False)
End If