|
|
|
|
|
|
GetDBDate - Formatting a date as a DateSerial for Access
|
Total Hit (2790) |
«Code LangId=1»' Format a date as a DateSerial for Access
' Example: Debug.Print GetDBDate(date)
Public Function GetDBDate(sDate As String) As String
On Error GoTo ERROR_GetDBDate
Dim sTmp As String
If IsDate(sDate) = False Then
sTmp = sDate
Else
sTmp = "DateSe
....Read More |
Rating
|
|
|
GetRoshHashanah - Get the date of Rosh Hashanah (Jewish calendar)
|
Total Hit (2804) |
«Code LangId=1»' Returns the date that Rosh Hashanah begins
' for the requested year. It is important to note that
' Rosh Hashanah is based on the Lunar cycle so the Holiday
' actually begins at sunset of the day before the date
' returned by this function.
' Note: Many dates in the Jewish
....Read More |
Rating
|
|
|
IsValidDateField - Check whether a date is valid
|
Total Hit (3345) |
«Code LangId=1»Enum psDateTypes
AnyValidDate 'Allows any valid date to be entered
PastDate 'Only allows past dates (before today) to be entered
FutureDate 'Only allows future dates (after today) to be entered
TodayOrFuture 'Only allows today or future date to be
....Read More |
Rating
|
|
|
Monday - retrieving the date of the Monday for a specified week
|
Total Hit (2708) |
«Code LangId=1»
' Return the date of the Monday for a specified week..
' This function can be tweaked to return any weekday. I use it in Access to
' subdivide reports into weekly units, since Access displays only a number
' between 1 and 53 for the week when you group dates by week.
'
' Note
....Read More |
Rating
|
|
|
|
|
|
|
|
TimeToString - Convert time to a descriptive string
|
Total Hit (3785) |
«Code LangId=1»' convert a date value into a string in the format
' YY years, MM months, DD days, HH hours, MM minutes, SS.HH seconds)
' you can also opt for time short format (HH h, MM m, SS s)
Function TimeToString(ByVal aDate As Date, Optional ShortTimeFormat As Boolean, _
Optional
....Read More |
Rating
|
|
|
ArrayAny - Return an initialized array of any type
|
Total Hit (2043) |
«Code LangId=1»
' Returns an array and initializes it with passed data.
'
' It is similar to the Array function, but it works with
' array of any type. The type of the returned array is
' assumed to be the type of the first element in the
' parameter list, so you might need to force a given
....Read More |
Rating
|
|
|
ArrayAvg - The average of an array of any type
|
Total Hit (2086) |
«Code LangId=1»
' The average of an array of any type
'
' FIRST and LAST indicate which portion of the array
' should be considered; they default to the first
' and last element, respectively
' if IGNOREEMPTY argument is True or omitted,
' Empty values aren't accounted for
Function ArrayA
....Read More |
Rating
|
|
|
|
|
ArrayShuffle - Randomize the order of elements in an array
|
Total Hit (3429) |
«Code LangId=1»
' Shuffle the elements of an array of any type
' (it doesn't work with arrays of objects or UDT)
Sub ArrayShuffle(arr As Variant)
Dim index As Long
Dim newIndex As Long
Dim firstIndex As Long
Dim itemCount As Long
Dim tmpValue As Variant
firs
....Read More |
Rating
|
|
|
ArrayStdDev - The standard deviation of a numeric array
|
Total Hit (3154) |
«Code LangId=1»' The standard deviation of an array of any type
'
' if the second argument is True or omitted,
' it evaluates the standard deviation of a sample,
' if it is False it evaluates the standard deviation of a population
'
' if the third argument is True or omitted, Empty values are
....Read More |
Rating
|
|
|
ArraySum - The sum of all the items in an array of any type
|
Total Hit (2419) |
«Code LangId=1»
' Return the sum of the values in an array of any type
' (for string arrays, it concatenates all its elements)
'
' FIRST and LAST indicate which portion of the array
' should be considered; they default to the first
' and last element, respectively
Function ArraySum(arr As
....Read More |
Rating
|
|
|
|
|
|
BubbleSort - Sort Arrays using the BubbleSort Algorithm
|
Total Hit (3025) |
«Code LangId=1»
' Bubble Sort an array of any type
' BubbleSort is especially convenient with small arrays (1,000
' items or fewer) or with arrays that are already almost sorted
'
' NUMELS is the index of the last item to be sorted, and is
' useful if the array is only partially filled.
'
'
....Read More |
Rating
|
|
|
|
UniqueWords - Extract all individual words in a string
|
Total Hit (1694) |
«Code LangId=1»
' build a list of all the individual words in a string
'
' returns a collection that contains all the unique words.
' The key for each item is the word itself
' so you can easily use the result collection to both
' enumerate the words and test whether a given word appears
'
....Read More |
Rating
|
|
|
|