Subversion Repositories DevTools

Rev

Rev 5506 | Rev 5670 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5506 Rev 5632
Line 14... Line 14...
14
Function EuroDateTime ( dDate )
14
Function EuroDateTime ( dDate )
15
	' Ensures Euro DateTime format DD/MM/YYYY H24:MIN:SS
15
	' Ensures Euro DateTime format DD/MM/YYYY H24:MIN:SS
16
	If IsNull(dDate) Then Exit Function
16
	If IsNull(dDate) Then Exit Function
17
	EuroDateTime = Day(dDate) &"/"& Month(dDate) &"/"& Year(dDate) &" "& FormatDateTime( dDate, 4 )
17
	EuroDateTime = Day(dDate) &"/"& Month(dDate) &"/"& Year(dDate) &" "& FormatDateTime( dDate, 4 )
18
End Function
18
End Function
-
 
19
Function DayName (intDay)
-
 
20
  '------------------------------------------
-
 
21
  ' Returns Abbreviated Day of Week
-
 
22
  '------------------------------------------
-
 
23
  select case intDay
-
 
24
      case 1
-
 
25
          DayName = "Sun"
-
 
26
      case 2
-
 
27
          DayName = "Mon"
-
 
28
      case 3
-
 
29
          DayName = "Tue"
-
 
30
      case 4
-
 
31
          DayName = "Wed"
-
 
32
      case 5
-
 
33
          DayName = "Thu"
-
 
34
      case 6
-
 
35
          DayName = "Fri"
-
 
36
      case 7
-
 
37
          DayName = "Sat"
-
 
38
  end select
-
 
39
end function
-
 
40
 
-
 
41
function MonthToName(intMonth)
-
 
42
  '-----------------------------------------
-
 
43
  ' Returns Abbreviated Month Name
-
 
44
  '-----------------------------------------
-
 
45
  select case intMonth
-
 
46
      case 1
-
 
47
         MonthToName = "Jan"
-
 
48
      case 2
-
 
49
         MonthToName = "Feb"
-
 
50
      case 3
-
 
51
         MonthToName = "Mar"
-
 
52
      case 4
-
 
53
         MonthToName = "Apr"
-
 
54
      case 5
-
 
55
         MonthToName = "May"
-
 
56
      case 6
-
 
57
         MonthToName = "Jun"
-
 
58
      case 7
-
 
59
         MonthToName = "Jul"
-
 
60
      case 8
-
 
61
         MonthToName = "Aug"
-
 
62
      case 9
-
 
63
         MonthToName = "Sep"
-
 
64
      case 10
-
 
65
         MonthToName = "Oct"
-
 
66
      case 11
-
 
67
         MonthToName = "Nov"
-
 
68
      case 12
-
 
69
          MonthToName = "Dec"
-
 
70
  end select
-
 
71
end function
-
 
72
 
-
 
73
Function DisplayShortDate ( dDate )
-
 
74
	' Ensures Nice Date format DD-Mon-YYYY
-
 
75
	If IsNull(dDate) Then Exit Function
-
 
76
	DisplayShortDate = Day(dDate) & "-" & MonthToName( Month(dDate)) & "-" & Year(dDate)
-
 
77
End Function
-
 
78
 
-
 
79
Function DisplayDate ( dDate )
-
 
80
	' Ensures Nice Date format Day DD-Mon-YYYY
-
 
81
	If IsNull(dDate) Then Exit Function
-
 
82
	DisplayDate = DayName (WeekDay(dDate)) & " " & Day(dDate) & "-" & MonthToName( Month(dDate)) & "-" & Year(dDate)
-
 
83
End Function
-
 
84
 
-
 
85
Function DisplayShortDateTime ( dDate )
-
 
86
	' Ensures Nice Date format DD-Mon-YYYY HH:MM
-
 
87
	If IsNull(dDate) Then Exit Function
-
 
88
	DisplayShortDateTime = DisplayShortDate ( dDate ) &" "& FormatDateTime( dDate, 4 )
-
 
89
End Function
-
 
90
 
-
 
91
Function DisplayDateTime ( dDate )
-
 
92
	' Ensures Nice Date format Day DD-Mon-YYYY HH:MM
-
 
93
	If IsNull(dDate) Then Exit Function
-
 
94
	DisplayDateTime = DisplayDate ( dDate ) &" "& FormatDateTime( dDate, 4 )
-
 
95
End Function
-
 
96
 
-
 
97
Function DisplayDateTimeSecs ( dDate )
-
 
98
	' Ensures Nice Date format DD-Mon-YYYY HH:MM:SS
-
 
99
	If IsNull(dDate) Then Exit Function
-
 
100
	DisplayDateTimeSecs = DisplayDate ( dDate ) &" "& Right("0" & Hour(dDate), 2) & ":" & Right("0" & Minute(dDate), 2) & ":" & Right("0" & Second(dDate), 2)
-
 
101
End Function
-
 
102
 
19
'-----------------------------------------------------------------------------------------------------------------------------
103
'-----------------------------------------------------------------------------------------------------------------------------
20
Function ToLongDate ( dDate )
104
Function ToLongDate ( dDate )
21
	' DD/MM/YYYY  -> Saturday, June 26, 1943
105
	' DD/MM/YYYY  -> Saturday, June 26, 1943
22
	If IsNull(dDate) Then Exit Function
106
	If IsNull(dDate) Then Exit Function
23
	ToLongDate = FormatDateTime(dDate, 1)
107
	ToLongDate = FormatDateTime(dDate, 1)