Below is the introduction by Chip to his program ---- This is a great tool if you have data coming from all over the world --- Maybe you got what you needed from Rick --- But this date bussiness is quite messy



'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''
' modLocalTimeAndGMT
' By Chip Pearson, Excel Redirect, chip@cpearson.com
'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''
' This module contains functions to convert between Local Time and GMT (UTC) Time.
' These conversion functions take into account Daylight Savings Time. This module
' contains support functions for determining whether a date is within Daylight
' Savings Time.
'
' The primary conversion functions are:
' -------------------------------------
'
' ` Serial Times
' -------------------------
' GMTTimeToLocalTimeSerial
' This function converts a GMT (UTC) Time to the Local Time.
' Both input and output are VB/VBA Serial Dates.
' LocalTimeToGMTTimeSerial
' This function converts a local time to GMT (UTC) time.
' Both input and output are VB/VBA Serial Dates.
'
'
' FILETIMEs
' -------------------------
' FileTimeToSerialTime
' This converts a FILETIME to a serial time.
' SerialTimeToFileTime
' This function converts a serial time to a FILETIME.
'
' SYSTEMTIMES
' -------------------------
' SystemTimeToSerialTime
' This function converts a SYSTEMTIME to a serial time.
' SerialTimeToSystemTime
' This function converts a serial time to a SYSTEMTIME.
'
'
' Current Local And GMT Times
' ----------------------------
' LocalTimeNowAsSerial
' Returns the current local date and time as a serial time. Same as Now().
' LocalTimeNowAsFILETIME
' Populates a FILETIME variable with the current local date and time.
' LocalTimeNowAsSYSTEMTIME
' Populates a SYSTEMTIME variable with the current local date and time.
' GMTNowAsSerial
' Returns the current GMT date and time as a serial time.
' GMTNowAsFILETIME
' Populates a FILETIME variable with the current GTM date and time.
' GMTNowAsSYSTEMTIME
' Populates a SYSTEMTIME variable with the current GMT date and tim.
'
'
' The supporting function to determine Daylight Savings Time are:
' ---------------------------------------------------------------
'
' FirstDayOfWeekOfMonthAndYear
' This returns the first DayOfWeek for a date with the appropriate
' month and year. The Day component of the input value is not used,
' so it can be any day of the requested month and year.
'
' IsDateWithinDST
' This function returns TRUE or FALSE indicating whether the specified
' date is within Daylight Savings Time.
'
' LastDayOfWeekOfMonthAndYear
' This function returns the last DayOfWeek in the month and year of
' the specified DateValue The Day component of the input value is not used,
' so it can be any day of the requested month and year.
'
' NthDayOfWeekInMonth
' This function returns date of the Nth occurance of DayOfWeek of the
' month and year of the input date value. The Day component of the input
' value is not used, so it can be any day of the requested month and year.
'
' Daylight Savings Time is determined using USA standards and is assumed to start on
' either of the following dates:
'
' For years prior to 2007, Daylight Savings Time starts on the first Sunday of April.
' Standard Time begins on the last Sunday of October.
'
' For years 2007 and later, Daylight Savings Time begins on the second
' Sunday of March. Standard Time begins first Sunday of November.
'
' NOTE: If you have the SYSTEMTIME and/or FILETIME and/or TIME_ZONE_INFORMATION
' declared Public elsewhere in your project, you should remove the declarations
' from this file.
'
'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''