Sub DOW(datein As Long) As String
'given the date in datein return the Day of week of that date
Dim ret As String
Dim i As Int
i=DateTime.GetDayOfWeek(datein)
ret=""
Select Case i
Case 1
ret="Sun"
Case 2
ret="Mon"
Case 3
ret="Tue"
Case 4
ret="Wed"
Case 5
ret="Thu"
Case 6
ret="Fri"
Case 7
ret="Sat"
End Select
Return ret
End Sub
Sub DateStringLongFormat(date As String) As String
Dim day,mymonth,year As Int
Dim ret As String
year = date.SubString2(0,4)
mymonth = date.SubString2(4,6)
day = date.SubString2(6,8)
DateTime.DateFormat = "dd/MM/yyyy"
Dim l As Long
ret = day & "/" & mymonth & "/" & year
l = DateTime.DateParse(ret)
DateTime.DateFormat = "dd-MMM-yyyy"
ret = DOW(l) & " " & DateTime.Date(l)
Return ret
End Sub