Domino Code Fragment

Code Name*
Force British Date Format
Date*
12/17/2001
Source (or email address if you prefer)*
guy@soberskin.co.uk
IP address:.62.189.194.100
Description*
Sometimes a client/server will work to the American date format even though the regional settings are set to British.
This function will convert any date format to the British format(as a string)
Type*
LotusScript
Categories*
Date/Time Handling
Implementation:
None (plug and play)
Required Client:
(none)
Server:
(none)
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:
Function britishDateStr (dt As Variant) As String

' ======================================================
' Author: Guy Thomas
' Email : guy@soberskin.co.uk
' Date : Nov 2001
'
' IN:
' dt - a date or string of a date.
'
' OUT:
' britishDateStr - dt converted to british date format.
'
' Purpose : Converts the date passed in to the british
' date format
' ======================================================

If Cstr(dt)="" Then Exit Function
Dim NDT As notesDateTime
Set NDT=New notesDateTime(dt)
britishDateStr=Format(NDT.dateOnly, "dd/mm/yyyy")
End Function