Function CustomDate(DateToFormat, IncludeTime As Boolean) As String
Dim D$, propermonth
propermonth = StrConv(MonthName(Month(DateToFormat)), vbProperCase)
If IncludeTime Then
D = Format(DateToFormat, "dddd dd mmmm yyyy hh:mm:ss")
Else
D = Format(DateToFormat, "dddd dd mmmm yyyy")
End If
CustomDate = Replace(D, MonthName(Month(DateToFormat)), propermonth)
End Function
Sub testh()
MsgBox "Created on " & CustomDate("23/12/2021", True)
MsgBox "Created on " & CustomDate(Date, True)
MsgBox "Created on " & CustomDate(Now, True)
End Sub