Method and Apparatus for Diagnosing and Correcting the Millennium Bug
The present invention is related to a technique of modifying a computer file without requiring recompiling of the computer file, and in particular to a method, apparatus and computer readable medium for diagnosing and correcting the millennium bug in computer files of personal computers (PC).
A portion of the disclosure of this patent specification and drawings, including the source code set forth in the attached Appendices, contains material which is subject to copyright protection. As may be required by law, the copyright owner has no objection to the facsimile reproduction by anyone of the patent disclosure or patent document as it appears in Patent Office patent files or records, but otherwise reserves all copyright rights whatsoever.
Background It is a well known problem for many IBM (TM) personal computers and compatibles that basic input/ output systems (BIOS) made prior to the late 1980's cannot appropriately handle dates for the next millennium. Such computers use the short or abbreviated date format in which the year is given by the last two digits and the upper two "century" digits are omitted (e.g., 1997 is given as "97"). This is a particular problem since it is expected as the year 2000 approaches this defect in many computers, software applications and computer files generally will result in computer errors when the date 31 December 1999 changes to 1 January 2000. Rather than progressing to 1 January 2000, such computer systems will instead progress to the date 1 January 1900! The Year 2000 bug is an error that will be experienced by any computer file using the abbreviated date format. This abbreviation is one used in all programming languages to ascertain from the ROM BIOS of any computer the currently set date. The date conventions typically used are: y for year,
m for month, d for day, h for hour, n for minute, s for second.
If the date is specified within a computer file in the format dd/mm/yy, the file displays, when run, a date in the format 15/09/97 for 15 September 1997 for example. If however the date is specified as dd/mm yyyy, the return date is 15/09/1997. There are numerous date formats that are possible, examples of such are: dmyy, dddd mmmm yy, d/m/yy, dd-m-yy, etc. To further compound this error, if a date is in an abbreviated format as shown hereinbefore and the date 15/09/00 is entered while the system clock is still within the 1900s, the date is returned as 15/09/1900. If however the system clock is set in the 2000s, the return date is 15/09/2000. The above leads to the problem that any date entered into a computer application using an abbreviated date format is read by the application as a 1900s date until the 1st January 2000, at which time all the dates are read as 2000s dates. Thus, a date entered as 1997 in the abbreviated format is treated by the application as a 1997 date until 1/1/2000 when it will be treated by the application as a 2097 date.
The above holds true if the ROM BIOS used by the computer is 2000 compliant i.e., it uses the full date format. All Personal Computers capable of running Microsoft (TM) Windows (TM) are 2000 compliant (1986). Later dates apply to some UNIX, Mini, Midi and Mainframe computers. If the ROM BIOS is not 2000 compliant, a date outside of the 1900s is not possible.
Thus, a need clearly exists for a system of overcoming one or more disadvantages of the prior art.
Summary In accordance with a first aspect of the invention, there is provided a method of modifying a computer file, the method comprising the step of replacing one or more specified code portions in said computer file with a modified code portion without requiring recompiling of the computer file.
In accordance with a second aspect of the invention, there is provided a method for modifying a computer file, the method comprising the steps of: detecting one or more portions of the computer file containing a specified pattern; and replacing the one or more detected portions with respective portions of coded values, without requiring recompiling of the computer file. In accordance with a third aspect of the invention, there is provided a method for correcting the millennium bug in a computer file, the method comprising the step pf modifying one or more short date formats in the computer file to have long date formats without altering the functioning of the computer file.
In accordance with a fourth aspect of the invention, there is provided a method for correcting the millennium bug in a computer file, the method comprising the steps of: detecting one or more date formats in the computer file having the millennium defect; and replacing the one or more defective date formats with respective corrected date formats having the century in the year component, without altering the functioning of the computer file.
Preferably, the computer file is a program capable of being executed using a computer. Further, the detection may carried out by checking the computer file in
binary format, and the replacement may be carried out using corrected date formats in hexadecimal format.
Preferably, the detecting step comprises the step of pattern matching a short date format against the computer file. Preferably, the replacing step comprises the steps of determining if the detected date format is more than a predetermined number of characters, and if so replacing the short date format with a long date format. The predetermined number of characters is preferably a minimum of five. The replacing step further comprises the step of writing back the corrected date format in the computer file. Preferably, the computer file is processed in one or more segments of predetermined size, and the above steps are carried out using the one or more segments of predetermined size. Still further, the method is carried out until all segments of the computer file or portions thereof have been processed. Optionally, the size of the segments is 64KB. Preferably, a predetermined size portion of the previous segment is processed with the next segment to be processed or portion thereof. Preferably, the predetermined size portion is 19 bytes.
In accordance with a fifth aspect of the invention, there is provided an apparatus for correcting the millennium bug in a computer file, the apparatus comprising: means for detecting one or more date formats in the computer file having the millennium defect; and means for replacing the one or more defective date formats with respective corrected date formats having the century in the year component, without altering the functioning of the computer file.
Preferably, the apparatus is implemented using a general purpose computer. Still further, the apparatus is implemented using a computer program or software for execution using the general purpose computer.
In accordance with a sixth aspect of the invention, there is provided a computer readable medium having recorded thereon a computer program executable by a computer for correcting the millennium bug in a computer file, the computer program comprising the steps of: detecting one or more date formats in the computer file having the millennium defect; and replacing the one or more defective date formats with respective corrected date formats having the century in the year component, without altering the functioning of the computer file. Preferably, the computer file is a file used for the operation of the computer.
Brief Description of the Drawings
Embodiments of the invention are described hereinafter with reference to the drawings, in which: Fig. 1 is a flow diagram illustrating the diagnostic process according to the preferred embodiment of the invention;
Fig. 2 is a flow diagram illustrating the corrective process of the preferred embodiment; and
Fig. 3 is a block diagram of a general purpose computer with which the processes of Figs. 1 and 2 may be implemented.
Detailed Description
Generally, the present invention is directed to a method of modifying a computer file by replacing specified portions of the computer file with different code portions, while at the same time not causing the computer file to have to be recompiled to operate properly when run by a computer. In particular, the present invention is directed to a method or process, apparatus and computer readable medium for correcting the millennium bug in a computer file. The method is preferably adapted for use in the Microsoft (TM) Windows (TM) family of operating systems, including
Windows 3.X, Windows NT and Windows 95. The Year 2000 error affects all Windows (TM) 16-bit applications as they will work in either the 19XX or 20XX centuries, dependent on the clock setting from the ROM BIOS. Further, most applications use a short date format, ie day-month-year rather than day-month-century 5 year. The main exception to this general rule is Lotus (TM) applications, as they use the long date structure. All PC BIOSs since about 1986 have been 2000 compliant, so simply testing the BIOS of a computer is not sufficient to determine if a problem exists in terms of the Year 2000 error.
In the method of the preferred embodiment, one or more date formats are ι o detected in the computer file having the millennium defect. The types of computer files may include .EXE, .COM, .DLL, .VBX, etc. The one or more defective date formats are then replaced with respective corrected date formats having the century in the year component, without altering the functioning of the computer file. Thus, for example, a computer program in which the millennium bug has been corrected will operate
15 normally as though no change had been made except that the dates in the program will be completely corrected in terms of the Year 2000 error.
The apparatus for correcting the millennium bug in the computer file in accordance with this method is preferably implemented using software executing on a personal computer (PC) or compatible. In particular, the executing software diagnoses
20 files accessible preferably from a graphical user interface (GUI) Windows platform that may or may not be susceptible to the Year 2000 error, or millennium bug. Fig. 3 illustrates a representative embodiment of such a personal computer system for implementing the processes of diagnosing and correcting the millennium bug in accordance with the preferred embodiment.
25 The computer system 300 includes a computer 302, and a video display monitor 304. It may also include one or more input devices 318, 320. User inputs to operate the computer 302 are provided by the input devices. For example, a user can provide input to the computer 302 via the keyboard 318 and/or a pointing device such as the mouse 320. The computer system 300 may be connected to one or more other
computers using a communication channel such as a modem communications path, a computer network, or the Internet, for example. Further, any of several types of output devices including plotters, printers, laser printers, and other reproduction devices may be connected to the computer 302. The representative computer 302 has one or more central processing units
(CPU or processor) 316, memory 312 comprising random access memory (RAM), static RAM or cache, and read-only memory (ROM) containing inter alia the BIOS, a video interface/adaptor 306, an input/ output (I/O) interface 314, and storage device(s) generally depicted by block 308 in Fig. 3. The video interface/adaptor 306 connected to the video display monitor 304 provides video signals from the computer 302 for display on the video display monitor 304.
The storage device(s) 308 may comprise a floppy disc, a hard disc drive, a magneto-optical disc drive, magnetic tape, CD-ROM and/or any other of a number of non-volatile storage devices. The components 306 to 316 shown in Fig. 3 are coupled to each other via a bus 310. The bus 310 in torn can comprise data, address, and control buses. However, the overall structure and individual components of the computer system 300 are conventional and are well known to persons skilled in the art. Thus, the system 300 is simply provided for illustrative purposes and other configurations can be employed without departing from the scope and spirit of the invention. Operation of the system according to the preferred embodiment is described hereinafter with reference to Figs. 1 and 2 and Appendices A and B.
The description of the software is broken into two processes: diagnostic and corrective processes. The corrective process is reliant on the diagnostic process to complete its functionality, with some of the functionality of the diagnostic process re- used in the corrective process. Each process may stand alone as a separate software package, or the two processes may be combined as one software package. Preferably, the apparatus is implemented by executing the diagnostic and corrective processes recorded as software or computer programs on a computer readable mediums and loaded into the computer system 300 from the computer readable medium. Examples
of such computer readable medium include a floppy disk, magnetic tape, a hard disc drive, a ROM or integrated circuit, a magneto-optical disk, a radio or infra-red transmission channel between the computer and another device, a computer readable card such as a PCMCIA card, a network connection to another computer or networked device, and the Internet and Intranets including email transmissions and information recorded on websites and the like. The foregoing are merely exemplary of relevant computer readable mediums. Other computer readable mediums may be practiced without departing from the scope and spirit of the invention.
Diagnostic Process
Fig. 1 is a generalized flow diagram illustrating the diagnostic process according to the preferred embodiment of the invention. Processing commences in step 100. This may be done at the push of a button.
In step 102, a file is selected for processing. The file is selected preferably through the use of automatic selection of drives, directories, type, location, name or through user input, In step 104, a 64KB segment of the file or portion thereof (if less than 64KB) is loaded into a buffer (area of computer memory). Initially, the first 64KB of binary code of the relevant file is loaded into the buffer. In step 106, pattern matching is performed on the loaded 64KB segment to search for long or short format "year" dates in the segment. Thus, the segment of the computer file or code is searched for a pattern matching either a "yy" or "yyyy" format which includes day, month, spaces and separators (Λ , ._-|! : ; etc). These components may be on the left or right side of the year component. Numerous specific date formats are searched for using this pattern matching. The date formats may vary from the shortest form "dmyy" to the longest form "yyyy, dddd d-mmmm" and include standard formats such as
"dd/mm/yy" . As some dates may be specified in either/or upper and lower case, all combinations of case are searched. Numerous specific formats are specified in the accompanying Appendices.
When a short date format is detected in step 106 (yes), processing continues at step 108. In step 108, the date format is added to a list of relevant date formats detected in the file (it can be recorded in a to-do column, for example). Processing then continues at decision block 110. Otherwise, when step 106 returns false (no) from
5 the pattern matching, processing continues at decision block 110. Thus, if a short date format is found, the name of the file and the path are logged as a short date format. If a long date format is found then the name and path of the file are logged as a long date format. Both sets of information are preferably reported to the user, including the number of occurrences of short or long date formats within a file. ι o In decision block 110 a check is made to determine if there are any more 64KB segments. If decision block 110 returns true (yes), processing continues at step 104 and the hereinbefore described process (steps 104 to 110) is repeated. Otherwise, if decision block 110 returns false (no), processing continues at step 112. Thus, once the first 64KB segment or block of the computer file or code has been searched and any
15 patterns found, this segment or block of binary code is cleared from the buffer and the next 64KB segment of binary code in the file is loaded into the buffer, if available. This 64KB segment includes the final 19 bytes of the previous 64KB segment. This reloading of the previous 19 bytes allows for the identification of any date formats that may have appeared partially at the same end of the pervious 64KB of binary code. The
20 above pattern matching is then repeated. While the embodiment preferably utilises 19 bytes of the previous segment, the invention may be practiced with a different or varying number of bytes without departing from the scope and spirit of the invention provided all dates are properly detected (and corrected, if applicable).
In step 112, the final bytes (less than or equal to 64KB) are loaded into
25 memory from the file. In step 114, pattern matching is again conducted against the loaded remaining portion of the file in memory to determine long or short date formats therein. When a short date is detected (yes), processing continues at step 116. In step 116, the date format is added to the relevant list. Processing continues at step 118. When the pattern matching step 114 does not determine a short date format (no),
processing continues at step 118. This process is repeated until all of the binary code has been searched for any date patterns. If the file is less than 64KB or the last segment of the file is less than 64KB, only the required space is loaded into buffer for pattern matching. In step 118, all code remaining in the memory is removed from the memory.
This prepares the diagnostic process to be ready to handle the next file in step 120. This process may be repeated for one or more files. In step 122, the process terminates.
As binary code is the common language of all computers, the language that the file was written in and the platform the file operates on are irrelevant. If date formats are specified within the code of an application in any form other than y, m, d, h, n, s, the binary code transposes this format to the y, m, d, h, n, s, format. Hex is the format binary code takes when it is communicating with the actual processor. Hex or hexadecimal represents binary code as paired symbols ranging from 0-9 and A-F (e.g. 2000 is represented in hex as 07 DO).
Source code for implementing the diagnostic process is set forth in detail in Appendix A, which is incorporated herein (note that carriage returns in the source code have been replaced by the tilde (N) character to reduce the number of pages required to reproduce the source code).
Corrective Process
Fig. 2 is a flow diagram illustrating the corrective process according to the preferred embodiment of the invention. Processing commences in step 200. In step 202, the file location and path of a file is determined from the relevant list. The file is selected from the list of short date format files logged by the diagnostic module preferably or the user may select a file using any of a number of standard methods. In step 204, a 64KB segment in hexadecimal is loaded into the memory or buffer from the file. In step 206, pattern matching is carried out to determine the year component of the short date format. Thus, similar to the diagnostic process, the first
64KB of binary code is loaded into the buffer, but unlike the diagnostic process a search through the use of pattern matching is made for "yy" . When such a short format date is determined (yes), processing continues at step 208. Otherwise, if step 206 returns false (no), processing continues at decision block 226. In step 208, the hex address is identified for the short format date "yy" in the loaded 64KB segment. In step 210, a check is made to determine if the short date format is to the left or right of "yy" . A composition is made as to the usage of "d" and "m" . This is to determine if the date structure is to the left or right of the "yy " . In step 212, the number of characters and spaces involved in the date is determined. That is, a count is made of the number of characters, spaces and separators used in the date format. If this is less than five (5) bytes (characters, spaces and separators combined), the date format is skipped and reported to the user, preferably as "Unable to modify" . If the result of step 216 is less than five characters, processing continues at step 224. In step 224, the list is updated and processing continues at decision block 226. Otherwise, if step 212 determines that five or more characters are contained in the date, processing continues at step 214.
In step 214, the separator type is identified, (e.g. /,\,-, etc). That is, if there are five or more bytes available, the type of separator used is identified and the location and number of spaces is identified. If there are two spaces between the previous component of binary code and the date format and two spaces after the date format, then one space at either end is counted. If there are three spaces at one end and four at the other end, only two spaces on one end and three on the other are counted. Similarly, if there is only one space on one side, no spaces are counted.
In step 216, the number of spaces is identified and one space (00 or 20) is allowed after the previous hex entry and one space is allowed prior to the next. In step 218, the "yy" date format is replaced with "yyyy" date format, with or without separators. Once the format of the date has been recognised and the amount of bytes used by the date format, a substitution is made in the binary code loaded in the buffer at the hex address previously identified, ensuring that there is at least one space at either
end of the date function. For example, if the date format "dd/mm yy" is found, this date is substituted with "d/m/yyyy" as the usage of one "d" or "m" does not interfere with the operation of a long date format, "d/m/yy" would be substituted with "dmyyyy" etc. In step 220, the updated date format is written back to the file loaded in the buffer. 5 In step 222, the tracking list is updated so that the current date format is novel from a to-do column to a done column is updated, and processing continues at decision block 226.
The functioning of the computer file relates to the overall operation of the computer file when run on a computer, without requiring recompilation of the computer ι o file itself to run properly. That is, the modified computer file is capable of being run by a computer and is not damaged by the changes that have been made.
When a 64KB segment is loaded in buffer, there are certain addresses in the buffer that are used as indexes by the allocation table, which is the management component built into a compiled computer file. By searching for a short date format,
15 the number of characters between index points is determined by the software. Based on this, a substitution is made within the buffer to ensure that the modified date format is a long date format and that it fits within the same space so that the entries within the allocation table are not changed. Once the process is finished for a single or multiple substitutions, the 65KB segment of data stored in the buffer is written back into original
20 computer file, thus replacing the original 64K bytes that were read out. Once written back, there is no change to the pointers inside the file as recorded by the allocation table. The only changes that become apparent are in relation the files ability to support long date formats and the date stamp on the file (which indicates the date of file being changed) .
25 The reason 64KB segmenting is used in the preferred embodiment is that the majority of PC's support 16-bit applications, and 64KB is the largest segment that can be addressed using 16 bits. However, other block or segment sizes may be practiced dependent on the operating system that is used without departing from the scope and spirit of the invention.
In decision block 226, a check is made to determine if the 64KB segment is finished being processed. If decision block 226 returns false (no), processing continues at step 206 as described hereinbefore. Thus, the locating of short date formats in the loaded 64KB is continued until all of the 64KB segment has been searched and modified where required. Otherwise, if decision block 226 returns true (yes), processing continues at decision block 228.
In decision block 228, a check is made to determine if there is a 64KB segment or portion thereof remaining to be processed. If decision block 228 returns false (no), processing terminates in step 232. Otherwise, if decision block 228 returns true (yes), processing continues at step 230. In step 230, the remaining 64KB segment or portion thereof is loaded into memory. If this is the last segment or portion of the file, a 64KB segment or portion thereof is loaded plus 19 bytes from the previous segment (this forms part of the newly loaded 64KB segment). Processing then continues at step 204 as described hereinbefore. Thus, once the searching/modifying is completed in one 64KB segment, it is then written back to the file replacing the original 64KB segment and the next 64KB section of binary code is loaded, again the final 19 bytes from the previous 64KB is included and the process is repeated. If the file is less than 64KB or the last segment of the file is less than 64KB, only the required space is loaded into buffer. As the allocation pointers within the processed file have not been modified by the processes of Figs. 1 and 2, nor has the location of the date or the size of the file been modified, the "corrected" file operates normally with the exception that it now uses a long date format making it completely 2000 compliant. The substitution is not limited to the date format used by a file, any component of a file may be altered in the same way. Thus, the preferred embodiment is able to correct the millennium bug in computer files and is able to do so in a manner that also occurs in computers that are so-called 2000-compliant.
Source code for implementing the corrective process is set forth in detail in Appendix B, which is incorporated herein (again, carriage returns have been replaced by tildes (-)).
5 Further Embodiment
The above described preferred embodiment including attached source code, with minor modifications, is also capable of additional functionality and can be used to implement a further embodiment of the mvention to modify files in a more general manner. ι o In the further embodiment, a generalised approach to modifying a computer is provided that does not require recompilation of the computer file to operate properly using a computer. This involves replacing one or more specified code portions (roughly corresponding to the data formats previously searched for) with respective different or modified code portions of this computer file without requiring
15 recompilation of the computer file. That is, the changed computer file is capable of operating properly on a computer although portions of the code have changed and possibly the particular operation or functioning itself of the file have changed. Thus, the computer file when run may do something differently from before but it still continues to run properly on the computer as though the computer file had not been
20 changed (i.e. , damaged). This preferably involves detecting one or more portions of the computer file containing a specified pattern, where the pattern may be specified or input by the user. Once detected, the detected portions of the computer file are replaced with different specified portions. This is done in a manner that does not require recompilation of the computer file.
25 Firstly, using the source code, there is the ability for a user to input a string to be searched for through the use of a text box, rather than using the pre-defined date formats contained in the attached source code of Appendices A and B. In other words, the date formats that are contained or coded into the program can be replaced by input from a user through a standard interface (eg. text box) which can be coded using well-
known standard techniques. The user may specify one or more characters rather than the five characters specified in step 212 of Fig. 2.
Secondly, there is the ability for a user to specify a string to replace the searched-for string, ensuring that the same number of characters (alpha, numeric, spaces or symbols) are used. This function would again replace the coded date substitution formats through the use of a user input box.
Thirdly, the above described processes and code for searching, loading 64KB segments into buffer, substituting strings and modifying any file format remain substantially the same and do not require substantial modification, or modification at all. It is simply a matter of replacing hard coded date formats with user input.
Only a small number of embodiments have been described. However, it will be apparent to those skilled in the art that changes and/or modifications can be made thereto without departing from the scope and spirit of the invention.
APPENDIX A
Diagnostic Utility
© MFX Research Pty Ltd 1997 ,...............«««.«..«.«*«........«........_....|n|t(atιng searcn 0 selected files and screen~'***conflguration~'*"********"*"*******""""***********"****"*~Private Sub
Command12_Clιck()~Screen MousePointer = HourGlass~Dιr2Search = DirList Path~Fιle2Search = Text7 Text~OK = True~lf ChkDιr_SubDιr Value = 1 Then~SubDιr = True-Else-SubDir = False-End lf~LblForm1_Searchιng Caption = "Scannιng"~Command12 Visible = FaIse~ChkDιr_SubDιr Visible = False~Label24 Visible = False~Text7 Visible = False~Label25 Visible = False-DirList Visible = False-FileList Visible = False-Label27 Visible = False-Label28 Visible = False-Combol Visible = False-Drivel Visible = False-Textδ Visible = True~No_Of_Searched = 0— If Not OK Then Dιr2Search = CurDιrS~lf Fιle2Search <> "" And Fιle2Search <> "* *" And Fιle2Search Like "[i*] *" Then~lf Len(Frm aιn DirList Path) > 3 Then~Dιr2Search = FrmMain DirList Path & "\"~Else~Dιr2Search = FrmMain DirList Path-End lf~Search (Dιr2Search & "\" & Fιle2Search)~No_Of_Searched = 1 ~GoTo Konec-End If— DirList Path = Dιr2Search~Call BrowseDιr(DιrLιst Path)~Konec ~TxtForm1_Searchιng Text = " Checking of files is complete "-Screen MousePointer = Default-SubDir = False~OK = False~Text6 Visible =
False~LblForm1_Searchιng Visible = False-TxtForm1_Searchιng Visible = False~Label22 Visible = True~Label8 Visible
= True~Command2 Visible = True~LstForm1_Results Visible = True~LstForm2_Results Visible = True-End
Sub — -Definitions — Public OK As Boolean-Public SubDir As Boolean-Public No_Matches As Long-Public
No_Of_Se arched As Long-Public Fιle2Search As String-Public Dιr2Search As String-Public Const PππtBytes As Integer = 64~Publιc Text2Fιnd As String-Public Text3Fιnd As String-Public Fna e As String-Public PositionNext As
Long-Public Offset As Long~'*********"******"***""**"*************"****"~'"*Thιs function opens the selected file and loads~'***the first 64Kb or 55529 bytes into buffer for~'"*searchιng by the "Sub FindStπng" module Once each~'***stπng is searched the next 64Kb block is loaded~'***untιl all of the file has been loaded and searched -."*««««""*****«*«""*«"**""*****««-""*~sub Search(FnamePath As Stπng)~Dιm TmpStr As String ' Declare variables -Dim Fsize As Long-Dim FixSize As Long-Dim StartByte As Long-Dim EndOfFile As Boolean-Fsize
= FιleLen(FnamePath)~StartByte = 1 -EndOfFile = False-Offset = 0~Text2Fιnd = "d/yy ~Text3Fιnd = "d yyyy"~lf Fsize > 65529 Then~FιxSιze = 65529-Fsιze = Fsize - 65529~Else~FιxSιze = Fsize-End lf~Open FnamePath For Binary As #1 'Open the file to buffer-Do While Not EndOfFile-TmpStr = ""-TmpStr = SpaceS(FιxSιze)~Get #1 , StartByte, TmpStr ' Read from file -FrmMain TxtForm1_Searchιng Text = Dιr2Search & Fιle2Search~FrmMaιn TxtForm1_Searchιng Refresh-FrmMam Lιst2 Addltem FrmMain TxtForm1_Searchιng Text-Call FindStπngfTmpStr, Text2Fιnd)~lf Fsize > 65529 Then~FιxSιze = 65529-Fsιze = Fsize - 65529-StartByte = StartByte + 65529-Offset = Offset + 1~Else~lf FixSize = Fsize Then EndOfFile = True-StartByte = StartByte + 65529-Offset = Offset + 1 ~FιxSιze = Fsize-End lf~Loop~Close #1 ' Close file -End Sub~,******"**"*"*""**""**""""********"**"**~'*"Searching the 64Kb strings loaded by "Sub Search"~'*"for any long or short date formats using the Lιke~'***command structure below to identify if any date formats~'"*are present in a selected file If there are then short~'***date (yy) formats are passed to the MFX DAT Table in the~""ShortDate column with long dates (yyyy) being placed in a lιst~'***box within the application~,*********"*"""****"**"******************"****~Sub FindStnngfSourceStr As String XStπng As Stπng)~Dιm CaseSensitive As Integer-Dim MyStπng As String-Dim OffsetFind As Long Position As Long-Dim LenSourceStr As Long-Dim MyDB As Database MyTable As Recordset-FrmMain Textδ Text = RightSfSourceStr, 30000) 'Update visual dιsplay~For i = 1 To 100-X = DoEvents()~Next~OffsetFιnd = Offset-PositionNext = 1 -Position = 0~Set MyDB = Workspaces(O) OpenDatabase( C \MFX\MFX DAT")~Set MyTable = MyDB OpenRecordsetfMFX", dbOpenTable)~lf SourceStr Like "*[dD][yY][yY][iyY]" Then MyTable AddNew MyTable("ShortDate' ) = FrmMain DirList Path & "\" & Fιle2Search MyTable Update FrmMain LstForm1_Results Addltem FrmMain DirList Path & "\" & Fιle2Search~lf SourceStr Like "*[dD][idmDM][yY][yY][tyY]*" Then MyTable AddNew MyTable(' ShortDate") = FrmMain DirList Path & "V & Fιle2Search MyTable Update FrmMain LstForm1_Results Addltem FrmMain DirList Path & "\" & Fιle2Search~lf SourceStr Like "*[dD] [idmDM][yY][yY][iyY]*" Then MyTable AddNew MyTable("ShortDate") = FrmMain DirList Path & "v & Fιle2Search MyTable Update FrmMain LstForm1_Results Addltem FrmMain DirList Path & "\" & Fιle2Search~lf SourceStr Like "*[dD]F dmDM] [yY][yY]r yY]*" Then MyTable AddNew MyTable("ShortDate") = FrmMain DirList Path & "V & Fιle2Search MyTable Update FrmMain LstForm1_Results Addltem FrmMain DirList Path & "\" & Fιle2Search~lf
SourceStr Like "*[dD] [idmDM] [yYHyYK'yY]*" Then MyTable AddNew MyTable("ShortDate") = FrmMain DirList Path & "\" & Fιle2Search MyTable Update FrmMain LstForm1_Results Addltem FrmMain DirList Path & "\" & Fιle2Search~lf SourceStr Like "*['yY][yY][yY][dD]*" Then MyTable AddNew MyTable("ShortDate") = FrmMain DirList Path & "\" & Fιle2Search MyTable Update FrmMain LstForm1_Results Addltem FrmMain DirList Path & "\" & Fιle2Search~lf SourceStr Like "*[iyY][yY][yY][idmDM][dD]*" Then MyTable AddNew MyTable("ShortDate") = FrmMain DirList Path & "\ & Fιle2Search MyTable Update FrmMain LstForm1_Results Addltem FrmMain DirList Path & "\" & Fιle2Search~If SourceStr Like "*[iyY][yY][yY][idmDM] [dD]*n Then MyTable AddNew MyTablef'ShortDate") = FrmMain DirList Path & "\ & Fιle2Search MyTable Update FrmMain LstForm1_Results Addltem FrmMain DirList Path & "\" & Fιle2Search~lf SourceStr Like "*[lyY][yY][yY] r dmD pD]*" Then MyTable AddNew MyTable("ShortDate") = FrmMain DirList Path & ' \ & Fιle2Search MyTable Update FrmMain LstForm1_Results Addltem FrmMain DirList Path & "\" & Fιle2Search~lf
SourceStr Like "'[^YKyYltyY] [idmDM] [dD]*" Then MyTable AddNew MyTable("ShortDate") = FrmMain DirList Path & \ & Fιle2Search MyTable Update FrmMain LstForm1_Results Addltem FrmMain DirList Path & "\" & Fιle2Search~lf SourceStr Like "*[mM][yY][yY][iyY]*" Then MyTable AddNew MyTable("ShortDate") = FrmMain DirList Path & "\" & Fιle2Search MyTable Update FrmMain LstForm1_Results Addltem FrmMain DirList Path & "\" & Fιle2Search~lf SourceStr Like "*[mM][idmDM][yY][yY][iyY]*" Then MyTable AddNew MyTablefShortDate") = FrmMain DirList Path & "V & Fιle2Search MyTable Update FrmMain LstForm1_Results Addltem FrmMain DirList Path & "\" & Fιle2Search~lf SourceStr Like "*[mM] [idmDM][yY][yY][iyY]*" Then MyTable AddNew MyTable("ShortDate") = FrmMain DirList Path & "\" & Fιle2Search MyTable Update FrmMain LstForm1_Results Addltem FrmMain DirList Path & "\" & Fιle2Search~lf SourceStr Like "*[mM][idmDM] [yYHyYJPyY]*" Then MyTable AddNew MyTable( ShortDate ') = FrmMain DirList Path & "\" & Fιle2Search MyTable Update FrmMain LstForm1_Results Addltem FrmMain DirList Path & ' V & Fιle2Search~lf
SourceStr Like "*[mM] [idmDM] [yY][yY]['yY]*" Then MyTable AddNew MyTable("ShortDate") = FrmMain DirList Path & "\" & Fιle2Search MyTable Update FrmMain LstForm1_Results Addltem FrmMain DirList Path & "\" & Fιle2Search~lf SourceStr Like "*[iyY][yY][yY][mM]*" Then MyTable AddNew MyTable("ShortDate") = FrmMain DirList Path & "\" & Fιle2Search MyTable Update FrmMain LstForm1_Results Addltem FrmMain DirList Path & "\" & Fιle2Search-lf SourceStr Like "*[iyY][yY][yY][idmDM][mM]*" Then MyTable AddNew MyTable("ShortDate") = FrmMain DirList Path & "\" & Fιle2Search MyTable Update FrmMain LstForm1_Results Addltem FrmMain DirList Path & "\" & Fιle2Search~lf SourceStr Like "*['yY][yY][yY] ['dmDM][mM]*" Then MyTable AddNew MyTable("ShortDate") = FrmMain DirList Path & "\" & Fιle2Search MyTable Update FrmMain LstForm1_Results Addltem FrmMain DirList Path & "\" & Fιle2Search~lf SourceStr Like M*[iyY][yY][yY][idmDM] [mM]*" Then MyTable AddNew MyTablefShortDate") = FrmMain DirList Path & "\" & Fιle2Search MyTable Update FrmMain LstForm1_Results Addltem FrmMain DirList Path & "\" & Fιle2Search~lf SourceStr Like "*['yY][yY][yY] [idmDM] [mM]*' Then MyTable AddNew MyTablefShortDate") = FrmMain DirList Path & "\" & Fιle2Search MyTable Update FrmMain LstForm1_Results Addltem FrmMain DirList Path & "V & Fιle2Search~lf SourceStr Like "*[dD][yY][yY][yY][yY]['yY]*" Then FrmMain LstForm2_Results Addltem FrmMain DirList Path & "\" & Fιle2Search~lf SourceStr Like "*[dD][idmDM][yY][yY][yY][yY][iyY]*" Then FrmMain LstForm2_Results Addltem FrmMain DirList Path & "\" & FιIe2Search~lf SourceStr Like "*[dD][idmDM]['dmDM][yY][yY][yY][yY][iyY]*" Then FrmMain LstForm2_Results Addltem FrmMain DirList Path & "\" & Fιle2Search~lf SourceStr Like
•'*[dD][idmDM][idmDM][idmDM][yY][yY][yY][yY][iyY]*" Then FrmMain LstForm2_Results Addltem FrmMain DirList Path & "\" & Fιle2Search~lf SourceStr Like "*['yY][yY][yY][yY][yY][dD]*" Then FrmMain LstForm2_Results Addltem FrmMain DirList Path & "\" & Fιle2Search~lf SourceStr Like "*[iyY][yY][yY][yY][yY][idmDM][dD]*" Then FrmMain LstForm2_Results Addltem FrmMain DirList Path & "\" & Fιle2Search~lf SourceStr Like
"*[iyY][yY][yY][yY][yY][idmDM][idmDM][dD]*" Then FrmMain LstForm2_Results Addltem FrmMain DirList Path & "\" & Fιle2Search~lf SourceStr Like " yY][yY][yY][yY][yY][idmDM][idmDM][idmDM][dD]*" Then FrmMain LstForm2_Results Addltem FrmMain DirList Path & "\" & Fιle2Search~lf SourceStr Like "*[mM][yY][yY][yY][yY][iyY]*" Then FrmMain LstForm2_Resu!ts Addltem FrmMain DirList Path & "\" & Fιle2Search~lf SourceStr Like "*[mM][idmDM][yY][yY][yY][yY][iyY]*" Then FrmMain LstForm2_Results Addltem FrmMain DirList Path & "\" & Fιle2Search~lf SourceStr Like "*[mM]['dmDM][idmDM][yY][yY][yY][yY][iyY]*" Then FrmMain LstForm2_Results Addltem FrmMain DirList Path & "\" & Fιle2Search~lf SourceStr Like "*[mM][idmDM][idmDM][idmDM][yY][yY][yY][yY][iyY]*" Then FrmMain LstForm2_Results Addltem FrmMain DirList Path & "\" & Fιle2Search~lf SourceStr Like "*['yY][yY][yY][yY][yY][mM]*" Then FrmMain LstForm2_Results Addltem FrmMain DirList Path & "\" & Fιle2Search~lf SourceStr Like "*['yY][yY][yY][yY][yY][idmDM][mM]*" Then FrmMain LstForm2_Results Addltem FrmMain DirList Path & "\" & Fιle2Search~lf SourceStr Like "*[iyY][yY][yγ][yY][yY][idmDM][idmDM][mM]*" Then FrmMain LstForm2_Results Addltem FrmMain DirList Path & "\" & Fιle2Search-lf SourceStr Like "*[iyY][yY][yY][yY][yY][|dmDM][idmDM][idmDM][mM]*" Then FrmMain LstForm2_Results Addltem FrmMain DirList Path & "\" & Fιle2Search~MyTable Close-MyDB Close-Position = lnStr(1 , SourceStr, XStπng) 'Position in stnng-LenSourceStr = Len(SourceStr) 'Length of stπng-PositionNext = 1 -If Position <> 0 Then-Do While Position <> 0~No_Matches = No_Matches + 1~Posιtι + Len(XStrιng)~Posιtι SourceStr, XStπng)~lf PositionNext <> 0 Then-Position = PosιtιonNext~Else~Posιtιoπ = 0-End lf~Loop-Eπd lf~For i = 1 To 100-X = DoEvents()~Next~SourceStr = ""-FrmMain Text6 Text = " -End Sub~'"*""*""""""""*"*""""""*"""""~,*"Loading of the individual strings and separation-'""*"*"* — "•*«*«««*.»»«.«««»««««._Sut) StrChg(ByRef TempStr As String, OldChar As String, NewChar As String) ' As Integer-Dim NewStπng As String-Dim Counter As Integer-Dim OCount As Integer-NewStππg = TempStr-For Counter = 1 To Len(TempStr)~lf Mιd$(TempStr, Counter 1 ) = OldChar Then~Mιd(NewStπng Counter 1 ) = NewChar-OCount = OCount + 1 ~End If-Next-TempStr = NewStπng-SourceStr = NewStπng-'StrChg = OCouπt-End Sub—
APPENDIX B
Correctional Utility
© MFX Research Pty Ltd 1997
•-'"'Initiate the pr0grarn_..*...»«..........»*««»***»*.*.».***«««*****»***«*»^prιvate sub cmdFιx_Clιck()~Select Case FlagFix-Case
"Fιx"~MFX_Manager~Case "PartRect"-VιewPartRectLιst~Case "NotRect"~VιewNotRectLιst~End Select — Definitions — Public Position As Long-Public Buffer As String-Public Year_on_Rιght, Long_Format As Boolean-Public FlagFix As String-Public CntRect_Dates As Integer-Public CntNotRect_Dates As Integer-Public LenTxt2Fιnd As Integer-Public Modιfing_Path As String-Public Offset, Last_Pos_dm As Long_,..«..«.«..».««....~.......~^ checks if there is a Short "Left" date format on left sιde-'"*of "yy' _-**«««««««««"*«*"«*««««*"»«*^^^ Function
Check_Left(DateStr As String) As Boolean-Select Case True-Case DateStr Like "*[dD][yY][yY][iyY]*"~Check_Left = True-Case DateStr Like "*[dD][idmDMyY][yY][yY][iyY]*"~Check_Left = True-Case DateStr Like "*[dD][idmDMyY][idmDMyY][yY][yY][iyY]*"~Check_Left = True-Case DateStr Like "*[dD][idmDMyY][idmDMyY]['dmDMyY][yY][yY][iyY]*"~Check_Left = True-Case DateStr Like
"*[mM][yY][yY][iyY]*"~Check_Left = True-Case DateStr Like "*[mM][idmDMyY][yY][yY][iyY]*' ~Check_Left = True-Case DateStr Like "*[mM][idmDMyY][idmDMyY][yY][yY]PyY]*"~Check_Left = True-Case DateStr Like "*[mM][idmDMyY][idmDMyY][idmDMyY][yY][yY][iyY]*"~Check_Left = True-Case Else~Check_Left = False-End Select-End Functιon~,*******"***""*"""•""***"""********"****"*****— "*"*""~'"*Check_Rιght checks if there is Short or Long "Right" date format~'***on right side of
,yy.^,.,,....,,.,.,....,....................**.......«.«.....«........«..^pπvate Funct,on Check_Rιght(DateStr As String) As
Boolean-Select Case True-Case DateStr Like "[yY][yY][dD]*"~Check_Rιght = True-Case DateStr Like "[yY][yY][yY][yY][dD]*"~Check_Rιght = True~Long_Format = True-Case DateStr Like "[yY][yY][idmDMyY][dD]*"~Check_Rιght = True-Case DateStr Like "[yY][yY][yY][yY][idmDMyY][dD]* '~Check_Rιght = True~Long_Format = True-Case DateStr Like "[yY][yY][idmDMyY][idmDMyY][dD]*"~Check_Rιght = True-Case DateStr Like "[yY][yY][yY][yY][idmDMyY]['dmDMyY][dD]*"~Check_Rιght = True~Long_Format = True-Case DateStr Like "[yY][yY][idmDMyY][ldmDMyY][idmDMyY][dD]*"~Check_Rιght = True-Case DateStr Like
"[yY][yY][yY][yY][idmDMyY][idmDMyY][idmDMyY][dD]*"~Check_Rιght = True~Long_Format = True-Case DateStr Like "[yY][yY][mM]*"~Check_Rιght = True-Case DateStr Like "[yY][yY][yY][yY][mM]*"~Check_Rιght = True~Long_Format = True-Case DateStr Like "[yY][yY][idmDMyY][mM]*"~Check_Rιght = True-Case DateStr Like
"[yY][yY][yY][yY]['dmDMyY][mM]*"~Check_Rιght = True~Long_Format = True-Case DateStr Like "[yY][yY][ldmDMyY][ldmDMyY][mM]*"~Check_Rιght = True-Case DateStr Like
"[yY][yY][yY][yY][idmDMyY][idmDMyY][mM]*"~Check_Rιght = True~Long_Format = True-Case DateStr Like "[yY][yY][idmDMyY][ldmDMyY][idmDMyY][mM]*"~Check_Rιght = True-Case DateStr Like "[yY][yY][yY][yY][idmDMyY][idmDMyY][idmDMyY][mM]*"~Check_Rιght = True~Long_Format = True-Case
Else~Check_Rιght = False-End Select-End
Function-'*"***""*""""""*"""*****""""**"*"**"""**"*— "'"--"CheckFile checks correct path and name of a file to be mod|fjed~'""*"**"*****""**"********"^ Function
CheckFιle(FιleNamePath As String) As Boolean-Dim File, ChkFile As String-Dim x, Slash As Integer-On Error GoTo ErrorHandler~x = 1 ~Do Until x = 0~Slash = x~x = lnStr(x + 1 , FileNamePath, "\")~Loop~Fιle =
LCase$(MιdS(FιleNamePath, Slash + 1 ))~ChkFιle = LCase$(Dιr(FιleNamePath))~lf File = CrkFile Then-CheckFile = True-Else-CheckFile = False-End If-GoTo Konec-ErrorHandler -CheckFile = False-Resume Next-Konec -End Function~'**"*"****"***""""**"***""*""*"**""***"""****"**"****~'"*Find_DB_Date finds short and medium database date format in 64KB strιng~'"*and replaces it with long date format-'"" — .*«««««*.****»«««««"««*«~"*««*«.«««*«*-..«*_pub||C Sub Fιnd_DB_Date(DB_Str64K As
Stπng)~Dιm pos_Short, pos_Medιum, Pos_for_DBReplace As Long-Dim DB_SourceStr As String-Const ShortFormat = "dd/mm/yyyy"~Const MediumFormat = "dd-mmm-yyyy"~DB_SourceStr = DB_Str64K~pos_Short = 0~pos_Medιum = 0~pos_Short = lnStr(1 , DB_SourceStr, "Short Date")~pos_Medιum = lnStr(1 , DB_SourceStr, "Medium Date")~lf (poε_Short <> 0) Or (pos_Medιum <> 0) Then-Do While pos_Short <> 0 'Find short date and replace~Pos_for_DBReplace = ((Offset * 65529) - (Offset * LenTxt2Fιnd)) + pos_Short~Put #1 , Pos_for_DBReplace, ShortFormat~CntRect_Dates = CntRect_Dates + 1~pos_Short = pos_Short + 10-pos_Short = lnStr(pos_Short, DB_SourceStr, "Short Date")~Loop~Do While pos_Medιum <> 0 'Find medium date and replace~Pos_for_DBReplace = ((Offset * 65529) - (Offset * LenTxt2Fιnd)) + pos_Medιum~Put #1 , Pos_for_DBReplace, MedιumFormat~CntRect_Dates = CntRect_Dates + 1 ~pos_Medιum = pos_Medιum + 11~pos_Medιum = lπStr(pos_Medιum, DB_SourceStr, "Medium Date")~Loop~End lf~DB_SourceStr = ""-End
Sub~,"*"*"-*-""""""**""""*******""*****""*""*""***""~'***Fιπd_yy searches for "yy" and sets position for replace of date~'"*format depending on where this format is located Checks if date-'***ιs at the begιn(fιrst 12Bytes) or the end(last 15Bytes)or in the~'*"mιdle of the file and 64KB string ~'«*«*««««*«««"**'"-"*«*«*««««"«^ Fιnd_yy(Str64K As Strιng)~Dιm Year_on_Left As Boolean 'Year_on_Rιght is Global-Dim Begιn_of_Fιle, End_of_Fιle, posl , pos4 As Boolean-Dim
ReplaceStr_Left_pos, ReplaceStr_Rιght_pos As Long-Dim ReρlaceStr_Left_take, ReplaceStr_Rιght_take As integer-Dim pos1_yy, pos4_YY, pos_yY, Pos_for_Replace As Long-Dim SourceStr As String-Dim LenghtStr As Long-SourceStr = Str64K~LenghtStr = Len(SourceStr)~Year_on_Rιght = False~Year_on_Left = False~pos_yY = 0~pos1_yy = 0~pos4_YY = 0-Pos_for_Replace = 0~pos1_yy = lnStr(1 , SourceStr, "yy") 'Find first "yy" and "YY"~pos4_YY = lnStr(1 , SourceStr, "YY")~Do While (pos1_yy <> 0) Or (pos4_YY <> 0)~pos1 = False~pos4 =
False~Long_Format = False-lf Forml Checkl Value Then Call Modιfing(SourceStr) 'Scanning 64KB-lf (pos1_yy < pos4_YY) And (pos1_yy > 0) Then~pos_yY = pos1_yy~pos1 = True~pos4 = False-Elself (pos4_YY < pos1_yy) And (pos4_YY > 0) Then~pos_yY = pos4_YY~pos1 = False~pos4 = True-Elself (pos1_yy <> 0) And (pos4_YY = 0) Then~pos_yY = pos1_yy~pos1 = True~pos4 = False-Elself (pos4_YY <> 0) And (pos1_yy = 0) Then~pos_yY = pos4_YY~pos1 = False~pos4 = True-End lf~'*"Date is on begin or end of 64KB string Date will not be modιfy~'*"at this
time, but in next 64KB stπng-lf (pos_yY < 12) And (LenghtStr - pos_yY < 2) Then Begιn_of_Fιle = True 'No Check_Left and No ReplaceLeft~lf (LenghtStr - pos_yY < 15) Then End_of_Fιle = True 'No Check_Rιght and No ReplaceRιght~'*"Check if "Left" date is on begin of the file and set position and~'*"leπght to modify depend on location-lf (Offset = 0) And (pos_yY < 12) Then 'No Check_Left but ReplaceLeft because it is begin of file~Year_on_Left = True-Begιn_of_Fιle = True 'Date on begin of the file~ReplaceStr_Left_pos = 1 'Date start posιtιon~ReplaceStr_Left_take = pos_yY 'Lenght to modιfy~Else~Begιn_of_Fιle = False 'Date after begιn~ReplaceStr_Left_pos = pos_yY - 11~ReplaceStr_Left_take = 11~End lf~lf (LenghtStr < 65529) And (LenghtStr - pos_yY < 2) Then Begιn_of_Fιle = True 'No Check_Left~'"*Check if "Right" date is on begin of the file and set position and~'"*lenght to modify depend on locatιon~lf (LenghtStr < 65529) And (LenghtStr - pos_yY < 15) Then 'No Check_Rιght but ReplaceRight because it is begin of file~End_of_Fιle = True~ReplaceStr_Rιght_pos = pos_yY~ReplaceStr_Rιght_take = LenghtStr - (pos_yY - 1 )~Else~End_of_Fιle = False~ReplaceStr_Rιght_pos = pos_yY + 2~ReplaceStr_Rιght_take = 11 -End lf~'*"Check if there is Short "Left" date format in 64KB string and~'*"check if there is Short or Long 'Right" date format in 64KB string for~'*"last position Modify position and lenght for modifing date depend on~'*"date format -If Not Begιn_of_Fιle Then Year_on_Left = Check_Left(Mιd$(SourceStr, pos_yY - 5, 8))~lf Not End_of_Fιle Then~Year_on_Rιght = Check_Rιght(Mιd$(SourceStr, pos_yY 9))~Elself (LenghtStr < 65529)
Then~Year_on_Rιght = Check_Rιght(Mιd$(SourceStr, ReplaceStr_Rιght_pos, ReplaceStr_Rιght_take))~lf Year_on_Rιght Then~ReplaceStr_Rιght_pos = ρos_yY + 2~ReplaceStr_Rιght_take = LenghtStr - (pos_yY + 1 )~End lf~lf Long_Foιτnat Then~ReplaceStr_Rιght_pos = ReplaceStr_Rιght_pos + 2~RepiaceStr_Rιght_take = ReplaceStr_Rιght_take~End lf~End |f~'"*CalI procedure for replasing short date formate to long date format~'***Before, check "Leftdate" modifing position with position of last modιfy~'***date formate and set new position For "Rightdate" find last posιtιon-'"*of this format-lf Year_on_Left Then~lf ReplaceStr_Left_pos <= Last_Pos_dm Then~lf (pos_yY - Last_Pos_dm > 2) Then~ReplaceStr_Left_pos = Last_Pos_dm + 1~ReplaceStr_Left ake = pos_yY - (Last_Pos_dm + 1 )~Else~GoTo EndlfLeft-End If-End lf~Pos_for_Replace = ((Offset * 65529) - (Offset * LenTxt2Fιnd)) + (pos_yY - 11 )~Call Replace_mgrLeft(Mιd$(SourceStr, ReplaceStr_Left_pos, ReplaceStr_Left_take), Pos_for_Replace)~EndlfLeft -End lf~lf Year_on_Rιght Then~Last_Pos_dm = ReplaceStr_Rιght_pos~SearchLastPos_dm_Rιght (Mιd$(SourceStr,
ReplaceStr_Rιght_pos, ReplaceStr_Rιght_take))~lf Not Long_Format Then-Pos_for_Replace = ((Offset * 65529) - (Offset * LenTxt2Fιnd)) + ReplaceStr_Rιght_pos-Call Replace_Rιght1 (Mιd$(SourceStr, ReplaceStr_Rιght_pos, ReplaceStr_Rιght_take) Pos_for_Replace)-End lf~End lf~lf posl Then~pos1_yy = pos1_yy + 3 'Find Next "yy"~pos1_yy = lnStr(pos1_yy, SourceStr, "yy")~End lf~lf pos4 Then~pos4_YY = pos4_YY + 3 'Find Next "yy"~pos4_YY = lnStr(pos4_YY, SourceStr, "YY")~End lf~Pos_for_Replace = 0~Year_on_Left = False~Year_on_Rιght =
False~Loop~SourceStr = ""~End Sub~'******"*""""****"*"*"""""*""""*"*-****"****"*"""*~'*"FixDate organises 64KB strings from present file for date,~'*"and how many passes are required to search whole file by 64KB segments~'"*""""*"""""****"""""*"""""""""""*""""*"~Sub FιxDate(FnamePath As Stπng)~Dιm TmpStr As String ' Declare variables -Dim Fsize, FixSize, StartByte As Long-Dim ls_Short, ls_Medιum As Long-Dim EndOfFile As Boolean-Dim LeftYear, RightYear As Boolean-Fsize = FιleLen(FnamePath)~StartByte = 1 -EndOfFile = False-Offset = 0-LeπTxt2Fιnd = 19 'Max length of date format~CntRect_Dates = 0~CntNotRect_Dates = 0— If Fsize > 65529 Then '-Checking if file is larger-FixSize = 65529 'than 64KB~Fsιze = Fsize - 65529 + LenTxt2Fιnd '-Reduce filesize to 64K~Else 'and max length of date format-FixSize = Fsize 'If not search whole file at once-End lf~Oρen FnamePath For Binary As #1 'Open file-Do While Not EndOfFιle~ls_Short = 0 'Reset vaπables~ls_Medιum = 0-LeftYear = False-RightYear = False-TmpStr = ""-TmpStr = Space$(FιxSιze)~Get #1 StartByte, TmpStr ' Read from file -'*" '""Precheck if there is "Left" or "Right" short date format in 64KB string— '***lf not searching will not be initialized for this 64KB string-'"* LeftYear =
Precheck_Left(TmpStr)~RιghtYear = Precheck_Rιght(TmpStr)~lf LeftYear Or RightYear Then~Modιfing_Path = FnamePath~Fιnd_yy (TmpStr) 'Initializing searhing engine-End If-'*** ~'"*Precheck if there is "Short" or "Medium" Database date format-'*" in 64KB string If not searching will not be ιnιtιalιzed~'***for this
64KB string-'*** ls_Short = lnStr(1 , TmpStr "Short Date")~ls_Medιum = lnStr(1 ,
TmpStr, "Medium Date")~If (ls_Short <> 0) And (ls_Medιum <> 0) Then~Fιnd_DB_Date (TmpStr) 'Initializing DB searching engine-End lf~if Fsize > 65529 Then 'Looking for next 64KB stπng-FixSize = 65529-Fsιze = Fsize - 65529 + LenTxt2Fιnd~StartByte = StartByte + 65529 - LenTxt2Fιnd '-Set position for reading-Offset = Offset + 1 'next 64KB~Else 'Rest of file~lf FixSize = Fsize Then EndOfFile = True-StartByte = StartByte + 65529 - LenTxt2Fιnd~Offset = Offset + 1~FιxSιze = Fsize-End lf~Loop-Close #1 ' Close file -End
Sub-'**""*""*"*"**"**"*""***"""""*"""""""*"""*""*~'*"MFX_Manager passes files to be rectified to the FιxDate~'*"procedure (MFX engine) and moves the listing of files in to~'*"lιst IstNotRect, IstRect, IstPartRect based on result of rectifing _'*»»*«««*«*««««"«*"*««*™*"^^ MFX_Manager()-Dιm Msg, NL As String-On Error GoTo 0-NL = Chr$(13) & Chr$(10)~lf Forml Iιst2 ListCount > 0 Then-For n = 0 To
(Forml lιst2 ListCount - 1 )~lf CheckFιle(Form1 Iιst2 Lιst(n)) Then-FixDate (Forml lιst2 Lιst(n))~lf (CntRect_Dates = 0) And (CntNotRect_Dates <> 0) Then~Form1 IstNotRect Addltem Forml Iιst2 Lιst(n)~Elself (CntNotRect_Dates = 0) And (CntRect_Dates <> 0) Then~Form1 IstRect Addltem Forml Iιst2 Lιst(n)~Elself CntRect_Dates < CntNotRect_Dates Then~Form1 IstPartRect Addltem Forml Iιst2 Lιst(n)~Msg = " was " & NL & "in minority fixed" & NL & "and can be affected by bug2000 "-MsgBox "This file " & Forml Iιst2 Lιst(n) & Msg-Elself (CntRect_Dates >= CntNotRect_Dates)
And (CntRect_Dates <> 0) Then~Form1 IstPartRect Addltem Forml Iιst2 Lιst(n)~Msg = " was " & NL & "in magoπty fixed" & NL & "and may be affected by bug2000 "-MsgBox "This file " & Forml Iιst2 Lιst(n) & Msg~Else-Form1 IstRect Addltem Forml Iιst2 Lιst(n)~Msg = " was " & NL & "changed after was diagnosed by MFX" & NL & "and does not include bug2000 "-MsgBox "Contens of this file " & Forml Iιst2 Lιst(n) & Msg-End If— Else ' Wrong Fιle~Msg = " does not Exist " & NL & "or was moved to the different location" & NL & "after was diagnose by MFX^'-MsgBox "This file " &
Forml Iιst2 Lιst(n) & Msg-End lf~Next~Dιm Rect, NotRect, PartRect-Rect = Forml IstRect ListCount-NotRect = Forml IstNotRect ListCount-PartRect = Forml IstPartRect ListCount-lf (Rect > 0) Or (NotRect > 0) Or (PartRect > 0) Then~lf NotRect = 0 Then~VιewPartRectLιst~Else~VιewNotRectLιst~End lf~UpdateMFX_DB~End If-Else-MsgBox "You did not select any files to fιχi"~End lf~Form1 Height = 4440-End Su _.*....«...-.....-.«.........«...........««.......«..~.........._....Dlsp|ay of actual part of modlflng of 64KB string~'**"**"*"*""****"""*""*"*"-*"""**"*"*""""******"~Private Sub Modιfιng(Str As Stπng)~Form1 Height = 5520~Form1 LabeH Caption = "Rectifiing " & Modιfιng_Path-Form1 Labell Refresh-Dim xx Iιne3-Dιm MyValue TmpNumber As Long-Dim TmpStr As Stπng-TmpStr = Str-MyValue = 100-TmpNumber = lnt((Len(TmpStr) * Rnd) +
1 )~lf MyValue > Len(T pStr) Then-MyValue = TmpNumber-TrπpStr = Mιd$(TmpStr, MyValue)~Else~TmpStr = Mιd$(TmpStr, TmpNumber, MyValue)~End If-CheckValue = lnt((Len(MyValue) * Rnd) + 1 )~Form1 text2 Text = "0000 ' & Hex((CheckValue + ι)) & " - "~lιne3 = 1~For i = 1 To Len(TmpStr)~xx = i Mod 20— If xx = 0 Then-lf Iιne3 < 2 Then~Form1 text2 Text = Forml text2 Text & Chr$(13) & Chr$(10) & "0000 " & Hex((CheckValue + ι)) & " - "~lιne3 = Iιne3 + 1 ~Else~Form1 text2 Text = "0000 " & Hex((CheckValue + ι)) & " - "-Iιne3 = 1~End lf~Form1 text2 Refresh~Else~Form1 text2 Text = Forml text2 Text & Hex(Asc(Mιd$(TmpStr, i, 1))) & " "~Form1 text2 Refresh-End lf~Next~End
Sub~'"***"*"""**"""*"""*""*""""***"*"*"***""*"*"****~'***Precheck_Left checks if there is "Left" short format in 64KB strιng~'***ιn proc FixDate before the 64KB string will be passed to proc Fιnd_yy~'"*to search for ' yy" or ..γγ..^........*....*«.«..*..*»»...««.«~»*.«.««*......*«....~*»»«««*.»_put,|lc Function Precheck_Left(Left64K As String)
As Boolean-Select Case True-Case Left64K Like "*[dD][yY][yY][iyY]*"~Precheck_Left = True-Case Left64K Like "*[dD][idmDMyY][yY][yY]['yY]*"~Precheck_Left = True-Case Left64K Like "*[dD][idmDMyY][idmDMyY][yY][yY][lyY]*"~Precheck_Left = True-Case Left64K Like "*[dD][idmDMyY][idmDMyY][idmDMyY][yY][yY][iyY]*"~Precheck_Left = True-Case Left64K Like "*[mM][yY][yY][iyY]*"~Precheck_Left = True-Case Left64K Like "*[mM][idmDMyY][yY][yY][iyY]*"~Precheck_Left = True-Case Left64K Like "*[mM][idmDMyY][idmDMyY][yY][yY][iyY]*"~Precheck_Left = True-Case Left64K Like "*[mM]['dmDMyY][idmDMyY][idmDMyY][yY][yY][iyY]*"~Precheck_Left = True-Case Else~Precheck_Left = False-End Select-End Functιon~'*"*""""""""*""*""**"*""""**"****""**""***""*"~'***Precheck_Rιght checks if there is "Right" short format in 64KB strιng~'"*ιn proc FixDate before the 64KB string will be passed to proc Fιnd_yy~'*"to search for "yy" or ' ^~,"""""—""***"*"*— **"*"""**"— "*"——"*"— "'"-Public Function Precheck_Rιght(Rιght64K As String) As Boolean-Select Case True-Case Rιght64K Like
"*[iyY][yY][yY][dD]*"~Precheck_Rιght = True-Case Rιght64K Like "*[iyY][yY][yY][idmDMyY][dD]*"~Precheck_Rιght = True-Case Rιght64K Like "*[iyY][yY][yY][idmDMyY][idmDMyY][dD]*"~Precheck_Rιght = True-Case Rιght64K Like "*[iyY][yY][yY][idmDMyY][idmDMyY][idmDMyY][dD]*"~Precheck_Rιght = True-Case Rιght64K Like "*[iyY][yY][yY][mM]*"~Precheck_Rιght = True-Case Rιght64K Like "*[iyY][yY][yY][idmDMyY][mM]*"~Precheck_Rιght = True-Case Rιght64K Like "*[iyY][yY][yY][idmDMyY][idmDMyY][mM]*"~Precheck_Rιght = True-Case Rιght64K Like "*[iyY][yY][yY][idmDMyY][idmDMyYJ[idmDMyY][mM]*"~Precheck_Rιght = True-Case Else~Precheck_Rιght = False-End Select-End Function-'""""**"""""""*"**"""****"*"**"*"*""""*"""***~'"*Replace_mgrLeft organises the three procedures to replace "Left"~'"*short date format with a long date format(ReplaceLeft_1 , Flep>iaceUeft_2,~■— *RepιaceL-e _3)~-'*****^ — ***** — ^*..**.*»».*.** — ^»»***.*»******«****«..**..***** — ,-*** — ^^—F^ub c Su > Replace_mgrLeft(mgrLStr As String, mgrLPos As Long)~Dιm mgrLeft_STR As String-Dim mgrLeft_Pos As Long~mgrLeft_STR = mgrLStr~mgrLeft_Pos = mgrLPos-Call ReplaceLeft_1 (mgrLeft_STR, mgrLeft_Pos)~lf Buffer = '" Then-Call ReplaceLeft_2(mgrLeft_STR, mgrLeft_Pos)~lf Buffer = "" Then-Call ReplaceLeft_3(mgrLeft_STR, mgrLeft_Pos)~End lf~End If — If Buffer = "" Then-lf Not Year_on_Rιght Then~CntNotRect_Dates = CntNotRect_Dates + 1~End lf~Else~Put #1 , Position, Buffer~CntRect_Dates = CntRect_Dates + 1 ~Year_on_Rιght = False-End lf~End Sub~'****""**""""*""""""""**"*"""""**"*-******"*""~'***SearchLastPos_dm_Right searches for last character of a "Right" date~'***format and saves this position to
Last_Pos_dm~'**"*"""*"*""""*""*"***"**"""*"""*******"**"*****~Private Sub SearchLastPos_dm_Rιght(SearchSTR As Strιng)~Dιm TMP_SearchSTR, TMP_Char, Znak As String-Dim TMP_Len SearchPos, ZnakCnt As Integer-Dim GroupEnd, ZnakEnd, m, d As Boolean-Dim StartPos_SearchSTR As Long~StartPos_SearchSTR = Last_Pos_dm-TMP_SearchSTR = SearchSTR~TMP_Len =
Len(TMP_SearchSTR)~SearchPos = -GroupEnd = True-'***
-'""Checks the actual character of a date string and sets flags-Do While GroupEnd~TMP_Char = Mιd$(TMP_SearchSTR, SearchPos, 1)~lf (TMP_Char Like "[yY]") Then GoTo KonecLoop~lf (TMP_Char Like "[idDmMy ]") Then Znak = "[mMdDyY]"~lf (TMP_Char Like "[ M]") Then-Znak = "[imM]' ~m = True-End lf~lf
(TMP_Char Like "[dD]") Then-Znak = "[idD]"~d = True-End If-ZnakCnt = 0~ZnakEnd = True~'"*searchιng through a group of the same characters for a different character-Do While ZnakEnd-SearchPos = SearchPos + 1~TMP_Char = Mιd$(TMP_SearchSTR, SearchPos, 1 )~lf (TMP_Char Like Znak) Then TMP_Char changed-ZnakEnd = Faise-Else-ZnakCnt = ZnakCnt + 1~End lf~lf (SearchPos = TMP_Len) And ZnakEnd Then 'End of TMP_SearchSTR and TMP_Char did not changed-ZnakEnd = False-SearchPos = SearchPos + 1~GroupEnd = False-Elself (SearchPos = TMP_Len) And Not ZnakEnd Then TMP_Char changed and end of TMP_SearchSTR~GroupEnd = False-End lf~Loop~'*"checkιng flags to determine if it is the last posιtιon~lf (m Or d) And ((Znak = "[imM]") Or (Znak = "[idD]")) Then Last_Pos_dm = StartPos_SearchSTR + (SearchPos - 2)~lf (Znak = "[mMdDyY]") And (ZnakCnt > 3) Then GroupEnd = False-lf m And d Then GroupEnd = False-GoTo JumpOver-KonecLoop -GroupEnd = False-JumpOver -Loop-End Sub-........**.....-..........**.........*.*........*..*.....".*...-.-*...*..^....UpcJateMFX_DB saves inforrriat|0n about rectified and non rectified— '***files to the database table mfx dat~'"""""""""*"""***""**""""*"""*"""""*""*"*"*~Private Sub UpdateMFX_DB()~Dιm Criteria As String-Dim MyDB As Database, MySet As Recordset-Set MyDB = Workspaces(O) OpenDatabasefc \mfx\mfx dat")~Set MySet = MyDB OpenRecordsetfmfx", dbOpenDynaset)-' Update MyTable("Rectιfied")~lf Forml IstRect ListCount > 0 Then-For n = 0 To (Forml IstRect ListCount - 1)~Crιterιa = "ShortDate = '" & Forml IstRect Lιst(n) & -MySet FindFirst
Criteria 'Checking if a File is in a MyTable("ShortDate")~Do Until MySet NoMatch-MySet Edit-MySet'Rectified = Forml IstRect Lιst(n) 'Write to field Rectified-MySet Update-MySet FmdNext Criteria-Loop-Next-End If-' Update MyTable("NotRectιfied")~lf Forml IstNotRect ListCount > 0 Then-For n = 0 To (Forml IstNotRect ListCount - 1)~Crιterιa = "ShortDate = '" & Forml IstNotRect Lιst(n) & -MySet FindFirst Criteria 'Checking if a File is in a MyTable("ShortDate")~Do Until MySet NoMatch-MySet Edit-MySetiNotRectified = Forml IstNotRect Lιst(n) 'Write to field NotRectified-MySet Update-MySet FmdNext Criteria-Loop-Next-End If-' Update MyTablefNotRectified" & "Rectified ) = PartRectιfied~lf Forml IstPartRect ListCount > 0 Then-For n = 0 To (Forml IstPartRect ListCount - 1 )~Crιterιa = "ShortDate = '" & Forml IstPartRect Lιst(n) & '""-MySet FindFirst Criteria 'Checking if a File is in a MyTable("ShortDate")~Do Until MySet NoMatch-MySet Edit-MySet'NotRectified = Forml IstPartRect Lιst(n) 'Write to field NotRectified-MySetiRectified = Forml IstPartRect Lιst(n) 'Write to field Rectified-MySet Update-MySet FmdNext Criteria-Loop-Next-End If-MySet Close-MyDB Close-End
Sub-'*"* **"**""****""*""""*"*"*""*"""— -*"*"*****""*"~'"*VιewNotRectLιst viewing files which could not be rectified by FixDate-'"*" *"— "— — "-*"—-« ..................... *^Sub
VιewNotRectLιst()~Form1 Iιst2 Clear-lf Forml IstNotRect ListCount > 0 Then-For n = 0 To (Forml IstNotRect ListCount -
1)~Form1 Iιst2 Addltem Forml IstNotRect Lιst(n)~Next~if Forml IstPartRect ListCount > 0 Then~Form1 cmdFix Caption
= "Show PartRectιfιed"~Form1 Frame2 Caption = "NotRectified fιles"~FlagFιx = "PartRect"~Form1 cmdreset Enabled =
True~Form1 cmdreset Visible = True-Else~Form1 Frame2 Caption = "NotRectified fιles"~Form1 cmdFix Enabled = False-Forml cmdreset Enabled = True~Form1 cmdreset Visible = True-End lf~End If-End
Sub_,......,.,.*.,.......................**.-...........*..................._....VιewPartRectL|St Vlewlng fl|es wh,cn were part|y rectified by FixDate- — .«*««~**«»«.«"*«.««"*«««*«*.»"«.«.-««.......«.._Sub
VιewPartRectLιst()~Form1 Iιst2 Clear-lf Forml IstPartRect ListCount > 0 Then-For n = 0 To
(Forml IstPartRect ListCount - 1 )~Form1 Iιst2 Addltem Forml IstPartRect Lιst(n)~Next~lf Forml IstNotRect ListCount > 0 Then~Form1 cmdFix Caption = "Show NotRectιfιed"~Form1 Frame2 Caption = "PartRectified files"— FlagFix =
"NotRect"~Form1 cmdreset Enabled = True~Form1 cmdreset Visible = True~Else~Form1 Frame2 Caption =
"PartRectified files"~Form1 cmdFix Enabled = False-Forml cmdreset Enabled = True~Form1 cmdreset Visible =
True-End lf~End If-End Sub-'"""*— —*—*"*"""""— "**"*""***""***"****— ~'"*ReplaceLeft_1 is the first group(of three groups) of short date~'*"formats where yy appears on the right hand side Two characters are~'***removed (usually non date characters) and an additional two yy's are~'"*ιnserted, to create a long date format -•...•«»«"«**"***«*****-**«**"*^^ Sub ReplaceLefM (DateStr As String,
Pos_Left As Long)~Dιm Rp As Integer-Position = 0 'position in string set to 0~Buffer = buffer cleared-Position =
Pos_Left~Rp = 11 - Len(DateStr)~Select Case True-Case DateStr Like
"[dD][idDmMyY][idDmMyY][idDmMyY][mM][mM][mM][mM][idDmMyY][idDmMyY][idDmMyY]" 'if the string is like d— mmmm— yy-Buffer = "d" & Mιd$(DateStr, 3, 6) & Mιd$(DateStr, 10) & "yy" 'change to d--mmmm~yyyy~Case DateStr Like
"[mM][idDmMyY][idDmMyY][idDmMyY][dD][dD][dD][dD][idDmMyY][idDmMyY][idDmMyY]"~Buffer = "m" & Mιd$(DateStr
3, 6) & Mιd$(DateStr, 10) & "yy"~Case DateStr Like
"*[dD][idDmMyY][idDmMyY]['dDmMyY][mM][mM][mM][idDmMyY][idDmMyY][idDmMyY]' -Buffer = "d" & Mιd$(DateStr 4,
5) & MιdS(DateStr, 10) & "yy"~Posιtιon = Position + 1~Case DateStr Like "*[mM][idDmMyY][idDmMyY][idDmMyY][dD][dD][dD][idDmMyY][idDmMyY][idDmMyY]"-Buffer = "m" & Mιd$(DateStr, 4,
5) & Mιd$(DateStr, 10) & "yy"~Posιtιon = Position + 1~Case DateStr Like
"*[dD][idDmMyY][idDmMyY][idDmMyY][mM][mM][idDmMyY]['dDmMyY][idDmMyY]' -Buffer = "d" & Mιd$(DateStr 5 4) &
Mιd$(DateStr, 10) & "yy"~Posιtιon = Position + 2~Case DateStr Like
"•[mMHidDmMyYHidDmMyYlE'dDmMyYHdDpDH'dDmMyYlIidDmMyYlt'dDmMyY]' -Buffer = "m" & MιdS(DateStr, 5, 4) & Mιd$(DateStr, 10) & "yy"~Posιtιon = Position + 2~Case DateStr Like
"*[dD][idDmMyY][idDmMyY][idDmMyY][mM][idDmMyY][idDmMyY][idDmMyY]' -Buffer = d" & Mιd$(DateStr, 6 3) &
Mιd$(DateStr, 0) & "yy"~Posιtιon = Position + 3~Case DateStr Like
"*[mM][idDmMyY][idDmMyY][idDmMyY][dD][idDmMyY][ldDmMyY][idDmMyY]"~Buffer = ' m" & Mιd$(DateStr, 6, 3) &
MιdS(DateΞtr, 10) & "yy"~Posιtιon = Position + 3~Case DateStr Like "*[mM]['dDmMyY][idDmMyY][idDmMyY]"~Buffer = "m" & Mιd$(DateStr, 11 ) & "yy"~Posιtιon = Position + 7~Case DateStr Like
"*[dD][idDmMyY][idDmMyY]['dDmMyY]"~Buffer = "d" & Mιd$(DateStr 11 ) & "yy' -Position = Position + 7~Case DateStr
Like "*[dD][idDmMyY][idDmMyY][mM][mM][mM][mM][idDmMyY][idDmMyY]"~Buffer = d" & MιdS(DateStr, 5, 5) &
Mιd$(DateStr, 11 ) & "yy"~Posιtιon = Position + 2~Case DateStr Like
"*[mM][idDmMyY][idDmMyY][dD][dD][dD][dD][idDmMyY][idDmMyY]' -Buffer = "πϊ & MιdS(DateStr, 5 5) & MιdS(DateStr, 11 ) & "yy"~Posιtιon = Position + 2~Case DateStr Like
"*[dD][idDmMyY][idDmMyY][mM][mM][mM][idDmMyY]['dDmMyY]"-Buffer = ' d" & MιdS(DateStr, 6, 4) & MιdS(DateStr,
11 ) & "yy"~Posιtιon = Position + 3~Case DateStr Like
"*[mMJ[idDmMyY][idDmMyY][dD][dD][dD][idDmMyY][idDmMyY]' -Buffer = ' m' & MιdS(DateStr, 6, 4) & MιdS(DateStr, 1 1 )
& "yy' -Position = Position + 3~Case DateStr Like "*[dD][ldDmMyY][idDmMyY][mM][mM][mM][idDmMyY][idDmMyY]' -Buffer = d' & MιdS(DateStr, 6 4) & Mιd$(DateStr, 1 ) & "yy"~Posιtιon = Position + 3~Case DateStr Like
"*[mM][idDmMyY][idDmMyY][dD][dD][idDmMyY][idDmMyY]"-Buffer = m' & MιdS(DateStr 6, 4) & MιdS(DateStr, 1 1 ) &
"yy"~Posιtιon = Position + 3~Case DateStr Like "*[dD][idDmMyY][idDmMyY][mM][mM][idDmMyY][idDmMyY]"~Buffer =
"d" & Mιd$(DateStr, 7, 3) & Mιd$(DateStr, 11) & "yy"~Posιtιon = Position + 4~Case DateStr Like "*[mM]['dDmMyY][idDmMyY][dD][dD][dD][idDmMyY][idDmMyY]"~Buffer = "m" & MιdS(DateStr, 7, 3) & Mιd$(DateStr, 11 )
& "yy"~Posιtιon = Position + 4~Case DateStr Like "*[dD][idDmMyY][idDmMyY][mM][idDmMyY][idDmMyY]"~Buffer = "d"
& Mιd$(DateStr, 8, 2) & Mιd$(DateStr, 1) & "yy"~Posιtιon = Position + 5~Case DateStr Like
"*[mM][idDmMyY][idDmMyY][dD][dD][idDmMyY][idDmMyY]"~Buffer = "m" & Mιd$(DateStr, 8, 2) & Mιd$(DateStr, 1 1 ) &
"yy"~Posιtιon = Position + 5~Case DateStr Like "*[dD]['dDmMyY][idDmMyY][mM][mM][mM][mM][idDmMyY][idDmMyY][idDmMyY]"~Buffer = "d" & Mιd$(DateStr, 4, 5) &
Mιd$(DateStr, 10) & "yy"~Posιtιon = Position + 1~Case DateStr Like
"*[mM]['dDmMyY][idDmMyY][dD][dD][dD][dD]['dDmMyY][idDmMyY][idDmMyY]"~Buffer = "m" & Mιd$(DateStr, 4, 5) &
Mιd$(DateStr, 10) & "yy"~Posιtιon = Position + 1~Case DateStr Like
"*[dD]['dDmMyY][idDmMyY][mM][mM][mM][idDmMyY][idDmMyY]['dDmMyY]"~Buffer = "d" & Mιd$(DateStr, 5, 4) & Mιd$(DateStr, 10) & "yy"~Posιtιon = Position + 2~Case DateStr Like
"*[mM]['dDmMyY][idDmMyY][dD][dD][dD][idDmMyY][idDmMyY][idDmMyY]"~Buffer = ' m" & Mιd$(DateStr 5, 4) &
MιdS(DateStr, 10) & "yy"~Posιtιon = Position + 2~Case DateStr Like
"*[dD][idDmMyY][idDmMyY][mM][mM][idDmMyY][idDmMyY][idDmMyY]"~Buffer = "d ' & Mιd$(DateStr 6, 3) &
Mιd$(DateStr, 10) & "yy"~Posιtιon = Position + 3~Case DateStr Like "*[mM][idDmMyY][idDmMyY][dD][dD][idDmMyY]['dDmMyY][idDmMyY] '-Buffer = "m" & Mιd$(DateStr, 6, 3) &
Mιd$(DateStr, 10) & "yy"~Posιtιon = Position + 3~Case DateStr Like
"*[dD][idDmMyY][idDmMyY][mM][idDmMyY][idDmMyY][>dDmMyY]"~Buffer = "d" & MιdS(DateStr, 7 2) & MιdS(DateStr,
10) & "yy"~Posιtιon = Position + 4~Case DateStr Like
"*[mM][idDmMyY][idDmMyY][dD][idDmMyY][idDmMyY][ldDmMyY]"~Buffer = "m" & MιdS(DateStr, 7, 2) & MιdS(DateStr, 10) & "yy"~Posιtιon = Position + 4~Case DateStr Like
"*[dD][idDmMyY][ldDmMyY][idDmMyY][mM][mM][mM][mM][idDmMyY][idDmMyY]"~Buffer = "d" & Mιd$(DateStr 4 6) &
Mιd$(DateStr, 1 1 ) & "yy"~Posιtιon = Position + 1 -Case DateStr Like
"*[mM][idDmMyY][idDmMyY][idDmMyY][dD][dD][dD][dD][idDmMyY][idDmMyY]"~Buffer = "m" & MιdS(DateStr 4 6) &
Mιd$(DateStr, 11) & 'yy"~Posιtιon = Position + 1~Case DateStr Like
"*[dD][idDmMyY][idDmMyY][idDmMyY][mM][mM][mM][idDmMyY][idDmMyY]"~Buffer = " d" & Mιd$(DateStr, 5, 5) &
Mιd$(DateStr, 11 ) & "yy"~Posιtιoπ = Position + 2~Case DateStr Like
"*[mM][idDmMyY]['dDmMyY]['dDmMyY][dD][dD][dD][idDmMyY][idDmMyY]"~Buffer = "m" & Mιd$(DateStr, 5, 5) & Mιd$(DateStr, 1 ) & "yy"~Posιtιon = Position + 2~Case DateStr Like
"*[dD][idDmMyY][idDmMyY][idDmMyY][mM][mM][idDmMyY][idDmMyY]' -Buffer = "d" & Mιd$(DateStr, 6 4) &
Mιd$(DateStr, 11 ) & "yy"~Posιtιon = Position + 3~Case DateStr Like
"*[mM][idDmMyY]['dDmMyY][idDmMyY][dD][dD][idDmMyY][idDmMyY]"~Buffer = "m" & Mιd$(DateStr, 6, 4) &
Mιd$(DateStr, 11 ) & "yy"~Posιtιon = Position + 3~Case DateStr Like '"[dDK'dDmMy Y][idDmMyY][idDmMyY][mM]['dDmMyY][idDmMy Y]' -Buffer = "d" & Mιd$(DateStr, 7, 3) & MιdS(DateStr
1 ) & "yy"~Posιtιon = Position + 4~Case DateStr Like
"*[mM][idDmMyY][idDmMyY][idDmMyY][dD][idDmMyY][idDmMyY]"~Buffer = "m' & Mιd$(DateStr 7, 3) & Mtd$(DateStr,
11 ) & "yy"~Posιtιon = Position + 4~Case DateStr Like
"*[dD][idDmMyY][idDmMyY]['dDmMyY][mM][mM][mM][mM][idDmMyY]"-Buffer = "d" & Mιd$(DateStr, 6) & "yy"~Posιtιon = Position + 2~Case DateStr Like ,'*[mM][idDmMyY][idDmMyY]['dDmMyY][dD][dD][dD][dD]['dDmMyY]"~Buffer = "m" &
Mιd$(DateStr, 6) & "yy"~Posιtιoπ = Position + 2~Case DateStr Like
"*[dD][idDmMyY]['dDmMyY][idDmMyY][mM][mM][mM][idDmMyY]"~Buffer = "d" & Mιd$(DateStr, 7) & "yy"~Posιtιon =
Position + 3~Case DateStr Like "*[mM][idDmMyY][idDmMyY][idDmMyY][dD][dD][dD][idDmMyY]"~Buffer = "m" &
Mιd$(DateStr, 7) & "yy"~Posιtιon = Position + 3~Case DateStr Like "*[dD][idDmMyY][ldDmMyY][ldDmMyY][mM][mM][ldDmMyY]"~Buffer = "d" & Mιd$(DateStr, 8) & "yy"~Posιtιon = Position
+ 4~Case DateStr Like "*[mM][idDmMyY][idDmMyY][idDmMyY][dD][dD][idDmMyY]"~Buffer = "m" & Mιd$(DateStr, 8) &
"yy"~Posιtιon = Position + 4~Case DateStr Like "*[dD][idDmMyY][idDmMyY][idDmMyY][mM][idDmMyY]"~Buffer =' "d" &
Mιd$(DateStr, 9) & "yy"-Posιtιon = Position + 5~Case DateStr Like
"*[mM][idDmMyY][ldDmMyY][idDmMyY][dD][idDmMyY]"~Buffer = "m" & Mιd$(DateStr, 9) & "yy"~Posιtιon = Position + 5~Case DateStr Like "*[dD][idDmMyY][idDmMyY][idDmMyY][mM][mM][mM][mM]"~Buffer = "d" & Mιd$(DateStr, 7) &
"yy"~Posιtιoπ = Position + 3~Case DateStr Like "*[mM][idDmMyY][ldDmMyY][idDmMyY][dD][dD][dD][dD]"~Buffer = "m" &
Mιd$(DateStr 7) & "yy"~Posιtιon = Position + 3~Case DateStr Like
"*[dD][idDmMyY][ldDmMyY][idDmMyY][mM][mM][mM]"~Buffer = "d" & Mιd$(DateStr, 8) & "yy"~Posιtιon = Position +
4~Case DateStr Like "*[mM]pdDmMyY][idDmMyY][idDmMyY][dD][dD][dD]"~Buffer = "m" & Mιd$(DateStr, 8) & "yy"~Posιtιon = Position + 4~Case DateStr Like "*[dD][idDmMyY][idDmMyY][idDmMyY][mM][mM]"~Buffer = "d" &
Mιd$(DateStr, 9) & "yy"-Posιtιon = Position + 5~Case DateStr Like
"*[mM][idDmMyY][idDmMyY][idDmMyY][dD][dD]"~Buffer = "m" & Mιd$(DateStr, 9) & "yy"~Posιtιon = Position + 5~Case
DateStr Like "*[dD][idDmMyY][idDmMyY][idDmMyY][mM]"~Buffer = "d" & Mιd$(DateStr, 10) & "yy"~Posιtιon = Position +
6~Case DateStr Like "*[mM][idDmMyY][idDmMyY][idDmMyY][dD]"~Buffer = ' m" & Mιd$(DateStr, 10) & "yy"~Posιtιon = Position + 6~Case Else-Buffer = ""-End Select-End
Sub_................................................*..................*....^....ReplaceLeft_2 IS the second gr0up(of three groups) of short date~'"*formats where yy appears on the right hand side Two characters are~'"*removed (usually non date characters) and an additional two yy's are-'*" inserted, to create a long date format ~''.."«**«««**"««"****«""***^^ Sub ReplaceLeft_2(DateStr As String, Pos_Left As Long)~Dιm Rp As Integer-Position = 0~Buffer = ""-Position = Pos_Left~Rp = 11 - Len(DateStr)~Select Case
True-Case DateStr Like "[dD][dD][dD][dD][idDmMyY][mM][mM][mM][mM][idDmMyY][idDmMyY]"-Buffer = Mιd$(DateStr,
2, 9) & "yy"~Case DateStr Like "[mM][mM][mM][mM][idDmMyY][dD][dD][dD][dD]['dDmMyY][idDmMyY]"~Buffer =
Mιd$(DateStr, 2, 9) & "yy"~Case DateStr Like
"[dD][dD][dD][dD][idDmMyY][idDmMyY][mM][mM][mM][mM][idDmMyY]' -Buffer = "ddd" & Mιd$(DateStr, 6) & "yy"~Case DateStr Like "[mM][mM][mM][mM][idDmMyY][idDmMyY][dD][dD][dD][dD][idDmMyY]"~Buffer = "mmm" & Mιd$(DateStr, 6)
& "yy"~Case DateStr Like "* [dD][idDmMyY][mM][mM][mM][mM][ldDmMyY][idDmMyY]"~Buffer = MιdS(DateStr 4, 7) &
"yy"~Posιtιon = Position + 2~Case DateStr Like "* [mM][idDmMyY][dD][dD][dD][dD][idDmMyY][idDmMyY]"~Buffer =
Mιd$(DateStr, 4, 7) & "yy"~Posιtιon = Position + 2~Case DateStr Like "*
[dD][idDmMyY][idDmMyY][mM][mM][mM][mM][ldDmMyY]"-Buffer = "d" & MιdS(DateStr, 6) & "yy"~Posιtιon = Position + 2~Case DateStr Like "* [mM][idDmMyY][idDmMyY][dD][dD][dD][dD][idDmMyY]"~Buffer = "m" & Mιd$(DateStr, 6) &
"yy"~Posιtιon = Position + 2~Case DateStr Like '" [dD][dD][idDmMyY][mM][mM][mM][idDmMyY][idDmMyY]"~Buffer =
Mιd$(DateStr, 4, 7) & "yy"~Posιtιon = Position + 2~Case DateStr Like "*
[mM][mM][idDmMyY][dD][dD][dD][idDmMyY][idDmMyY]"~Buffer = Mιd$(DateStr, 4, 7) & "yy"~Posιtιon = Position +
2~Case DateStr Like "* [dD][dD][idDmMyY]['dDmMyY][mM][mM][mM][idDmMyY]"~Buffer = "dd" & Mιd$(DateStr, 7) & "yy"~Posιtιon = Position + 2~Case DateStr Like "* [mM][mM][idDmMyY][idDmMyY][dD][dD][dD][idDmMyY]"~Buffer =
"mm" & Mιd$(DateStr, 7) & "yy"~Posιtιon = Position + 2~Case DateStr Like "*
[dD][dD][dD][idDmMyY][mM][mM][>dDmMyY]['dDmMyY]"-Buffer = Mιd$(DateStr, 4, 7) & "yy"-Posιtιon = Position +
2~Case DateStr Like "* [mM][mM][mM][idDmMyY][dD][dD][idDmMyY][idDmMyY]"~Buffer = Mιd$(DateStr, 4, 7) &
"yy"~Posιtιon = Position + 2~Case DateStr Like "* [dD][dD][dD[idDmMyY][!dDmMyY][mM][mM][idDmMyY]"~Buffer = "ddd" & Mιd$(DateStr 8) & "yy"~Posιtιon = Position + 2~Case DateStr Like "*
[mM][mM][mM][idDmMyY][idDmMyY]][dD][dD][idDmMyY]"~Buffer = "mmm" & Mιd$(DateStr, 8) & "yy"~Posιtιon =
Position + 2~Case DateStr Like "* [dD][dD][dD][dD][idDmMyY][mM][idDmMyY][idDmMyY]"~Buffer = Mιd$(DateStr, 4 7)
& "yy"~Posιtιon = Position + 2~Case DateStr Like "* [mM][mM][mM][mM][idDmMyY][dD][idDmMyY][idDmMyY]"~Bufτer =
Mιd$(DateStr, 4, 7) & "yy"~Posιtιon = Position + 2~Case DateStr Like "* [dD][dD][dD[idDmMyY][idDmMyY][mM][mM][idDmMyY]"~Buffer = "dddd" & Mιd$(DateStr, 9) & "yy"~Posιtιon = Position +
2~Case DateStr Like "* [mM][mM][mM][idDmMyY][idDmMyY]][dD][dD][idDmMyY]"~Buffer = "mmmm" & Mιd$(DateStr, 9)
& "yy"~Posιtιon = Position + 2-Case DateStr Like "* [dD][dD][idDmMyY][idDmMyY][mM][mM][mM][mM]"~Buffer = "dd" &
Mιd$(DateStr, 7) & "yy"~Posιtιon = Position + 2~Case DateStr Like "*
[mM][mM][idDmMyY][idDmMyY][dD][dD][dD][dD]"~Buffer = "mm" & Mιd$(DateStr, 7) & "yy"~Posιtιon = Position + 2~Case DateStr Like "* [dD][dD][dD]['dDmMyY][idDmMyY][mM][mM][mM]"~Buffer = ' ddd" & Mιd$(DateStr, 8) &
■ yy"~Posιtιon = Position + 2~Case DateStr Like "* [mM][mM][mM][idDmMyY][idDmMyY][dD][dD][dD]"~Buffer = ' mmm" &
Mιd$(DateStr, 8) & "yy"~Posιtιon = Position + 2~Case DateStr Like ' *
[dD][dD][dD][dD][idDmMyY][idDmMyY][mM][mM]' -Buffer = "dddd' & Mιd$(DateStr 9) & ' yy' -Position = Position +
2~Case DateStr Like "* [mM][mM][mM][mM][idDmMyY][idDmMyY][dD][dD]"~Buffer = "mmmm" & MιdS(DateStr 9) & "yy"~Posιtιon = Position + 2~Case DateStr Like "* [dD][dD][dD][dD]PdDmMyY][idDmMyY][mM][mM]"~Buffer = "ddmmmm" & Mιd$(DateStr, 10 1 ) & "yy"~Posιtιon = Position + 2~Case DateStr Like "*
[mM][mM][mM][mM][idDmMyY][idDmMyY][dD][dD]"~Buffer = "mmdddd" & Mιd$(DateStr 10, 1 ) & "yy"~Posιtιon = Position + 2~Case DateStr Like "*[dD][dD][dD][idDmMyY][mM][mM][mM][mM][idDmMyY][idDmMyY]"~Buffer =
Mιd$(DateStr, 3, 8) & "yy"~Posιtιon = Position + 1~Case DateStr Like
"*[mM][mM][mM][idDmMyY][dD][dD][dD][dD][idDmMyY][idDmMyY]"~Buffer = Mιd$(DateStr, 3, 8) & "yy"~Posιtιon = Position + 1~Case DateStr Like "*[dD][dD][dD][idDmMyY][idDmMyY][mM][mM][mM][mM][idDmMyY]"~Buffer = Mιd$(DateStr, 3, 3) & Mιd$(DateStr, 7) & "yy"~Posιtιon = Position + 1~Case DateStr Like "*[mM][mM][mM][idDmMyY][idDmMyY][dD][dD][dD][dD][idDmMyY]"~Buffer = MιdS(DateStr, 3, 3) & Mιd$(DateStr 7) & "yy"~Posιtιon = Position + 1 ~Case DateStr Like
"*[dD][dD][dD][dD][idDmMyY][mM][mM][mM][idDmMyY][idDmMyY]"~Buffer = Mιd$(DateStr, 3, 8) & "yy"~Posιtιon = Position + 1 ~Case DateStr Like "*[mM][mM][mM][mM][idDmMyY][dD][dD][dD][idDmMyY][idDmMyY]"~Buffer = Mιd$(DateStr, 3, 8) & "yy"~Posιtιon = Position + 1~Case DateStr Like "*[dD][dD][dD][dD][idDmMyY][idDmMyY][mM][mM][mM][idDmMyY]"~Buffer = Mιd$(DateStr, 3, 4) & MιdS(DateStr, 8) &
"yy"~Posιtιon = Position + 1~Case DateStr Like
"*[mM][mM][mM][mM][tdDmMyY][idDmMyY][dD][dD][dD]['dDmMyY]"-Buffer = Mιd$(DateStr, 3, 4) & MιdS(DateStr, 8) & "yy"~Posιtιon = Position + 1~Case DateStr Like "*[dD][dD][dD][dD][idDmMyY][idDmMyY][mM][mM][mM][mM]"~Buffer = Mιd$(DateStr, 3, 4) & Mιd$(DateStr, 8) & "yy"~Posιtιon = Position + 1~Case DateStr Like "*[mM][mM][mM][mM][idDmMyY]['dDmMyY][dD][dD][dD][dD]"~Buffer = Mιd$(DateStr, 3, 4) & MιdS(DateStr, 8) &
"yy"~Posιtιon = Position + 1 ~Case DateStr Like "*[dD][dD][dD][dD][mM][mM][mM][mM][idDmMyY][idDmMyY]"~Buffer = Mιd$(DateStr, 3, 8) & "yy"-Posιtιon = Position + 1 ~Case DateStr Like
"*[mM][mM][mM][mM][dD][dD][dD][dD][ldDmMyY][idDmMyY]"~Buffer = Mιd$(DateΞtr, 3, 8) & "yy"~Posιtιon = Position + 1 ~Case DateStr Like "* [dDπidDmMyY][mM][mM][mM][idDmMyY][ldDmMyY]"~Buffer = MιdS(DateStr, 5, 6) & "yy"~Posιtιon = Position + 3~Case DateStr Like "* [mM]['dDmMyY][dD][dD][dD][idDmMyY][idDmMyY]"~Buffer =
Mιd$(DateStr, 5, 6) & "yy"~Posιtιon = Position + 3~Case DateStr Like "*
[dD][idDmMyY][idDmMyY][mM][mM][mM][idDmMyY]"~Buffer = "d" & MιdS(DateStr, 7) & "yy"~Posιtιon = Position + 3~Case DateStr Like "* [mM][idDmMyY][idDmMyY][dD][dD][dD][idDmMyY]"~Buffer = " " & MιdS(DateStr, 7) & "yy"~Posιtιon = Position + 3~Case DateStr Like "* [dD][dD][dD][idDmMyY][mM][idDmMyY][idDmMyY]"~Buffer = Mιd$(DateStr, 5, 6) & "yy"~Posιtιon = Position + 3~Case DateStr Like "*
[mM][mM][mM][idDmMyY][dD][idDmMyY]['dDmMyY]"~Buffer = MιdS(DateStr, 5, 6) & "yy"~Posιtιon = Position + 3~Case DateStr Like "* [dD][idDmMyY][idDmMyY][mM][mM][mM][mM]"~Buffer = "d" & MιdS(DateStr, 7) & "yy"~Posιtιon = Position + 3~Case DateStr Like "* [mM][idDmMyY]['dDmMyY][dD][dD][dD][dD]"~Buffer = "m" & Mιd$(DateStr 7) & "yy"~Posιtιon = Position + 3~Case DateStr Like "* [dD][dD][idDmMyY][ldDmMyY][mM][mM][mM]"-Buffer = ' dd" & Mιd$(DateStr, 8) & "yy"~Posιtιon = Position + 3~Case DateStr Like "*
[mM][mM][idDmMyY][idDmMyY][dD][dD][dD]"~Buffer = "mm" & MιdS(DateStr, 8) & "yy"~Posιtιon = Position + 3~Case DateStr Like "* [dD][dD][dD][idDmMyY][idDmMyY][mM][mM]"~Buffer = "ddd" & Mιd$(DateStr, 9) & ' yy"~Posιtιon = Position + 3~Case DateStr Like "* [mM][mM][mM][idDmMyY][idDmMyY][dD][dD]"~Buffer = "mmm" & MιdS(DateStr, 9) & "yy"-Posιtιon = Position + 3~Case DateStr Like "* [dDHdDJtdD DH'dDmMyYHidDmMyYHm r-Buffer = "dddd" & Mιd$(DateStr, 10) & "yy"~Posιtιon = Position + 3-Case DateStr Like "*
[mM][mM][mM][mM][idDmMyY][idDmMyY][dD]"~Buffer = "mmmm" & Mιd$(DateStr, 10) & "yy"~Posιtιon = Position + 3-Case DateStr Like "* [dD][mM][mM][mM][mM][idDmMyY][idDmMyY]"~Buffer = Mιd$(DateStr, 5 6) & "yy"~Posιtιon = Position + 3-Case DateStr Like "* [mM][dD][dD][dD][dD][idDmMyY]pdDmMyY]"~Buffer = MιdS(DateStr, 5, 6) & "yy"~Posιtιon = Position + 3-Case DateStr Like "*[dD][dD][idDmMyY][mM][mM][mM][mM]pdDmMyY][ldDmMyY]"~Buffer = Mιd$(DateStr, 2, 3) & Mιd$(DateStr, 7, 4) & "yy"~Posιtιon = Position + 2~Case DateStr Like
"*[mM][mM][ldDmMyY][dD][dD][dD][dD][idDmMyY][idDmMyY]"~Buffer = Mιd$(DateStr, 2 3) & MιdS(DateStr, 7, 4) & "yy"~Posιtιon = Position + 2~Case DateStr Like "*[dD][dD][idDmMyY][idDmMyY][mM][mM][mM][mM][idDmMyY]"~Buffer = Mιd$(DateStr, 3, 3) & Mιd$(DateStr, 8) & "yy"~Posιtιon = Position + 2~Case DateStr Like "*[mM][mM]['dDmMyY][idDmMyY][dD][dD][dD][dD][idDmMyY]"~Buffer = Mιd$(DateStr, 3, 3) & MιdS(DateStr, 8) & "yy"~Posιtιon = Position + 2~Case DateStr Like "*[dD][dD][dD][idDmMyY][mM][mM][mM][idDmMyY][idDmMyY]"~Buffer = Mιd$(DateStr, 3, 6) & Mιd$(DateStr, 11 , 1) & "yy"~Posιtιoπ = Position + 2~Case DateStr Like
"*[mM][mM][mM][idDmMyY][dD][dD][dD][idDmMyY][idDmMyY]"~Buffer = Mιd$(DateStr, 3, 6) & Mιd$(DateStr, 11 , 1 ) & "yy"~Posιtιon = Position + 2~Case DateStr Like "*[dD][dD][dD][idDmMyY][idDmMyY][mM][mM][mM][>dDmMyY]"~Buffer = "dd" & Mιd$(DateStr, 7) & "yy"~Posιtιon = Position + 2~Case DateStr Like "*[mM][mM][mM][idDmMyY][idDmMyY][dD][dD][dD][idDmMyY]"~Buffer = "mm" & Mιd$(DateStr, 7) & "yy"~Posιtιon = Position + 2~Case DateStr Like "*[dD][dD][dD][dD][idDmMyY][idDmMyY][mM][mM][idDmMyY]"~Buffer = "ddd" & Mιd$(DateStr, 8) & "yy"~Posιtιon = Position + 2~Case DateStr Like
"*[mM][mM][mM][mM][idDmMyY][idDmMyY][dD][dD][idDmMyY]"~Buffer = "mmm" & MιdS(DateStr, 8) & "yy"~Posιtιon = Position + 2~Case DateStr Like ''*[dD][dD][dD][dD][idDmMyY][mM][mM][idDmMyY]['dDmMyY]"~Buffer = MιdS(DateStr, 4 7) & "yy"~Posιtιon = Position + 2~Case DateStr Like
"*[mM][mM][mM][mM][ldDmMyY][dD][dD][idDmMyY][idDmMyY]"~Buffer = Mιd$(DateStr, 4, 7) & "yy"~Posιtιon = Position + 2~Case DateStr Like "*[dD][dD][dD][ldDmMyY][idDmMyY][mM][mM][mM][mM]"~Bufτer = MιdS(DateStr 3, 4) & MιdS(DateStr, 9) & "yy"~Posιtιon = Position + 2~Case DateStr Like "*[mM][mM][mM][idDmMyY][ldDmMyY][dD][dD][dD][dD]"~Buffer = Mιd$(DateStr, 3, 4) & Mιd$(DateStr, 9) & ' yy"~Posιtιon = Position + 2~Case DateStr Like "*[dD][dD][dD][dD][idDmMyY][idDmMyY][mM][mM][mM]"~Buffer = MιdS(DateStr, 3, 3)
& MιdS(DateStr, 8) & "yy"-Posιtιon = Position + 2~Case DateStr Like
"*[mM][mM][mM][mM][idDmMyY][idDmMyY][dD][dD][dD]"~Buffer = MιdS(DateStr, 3, 3) & Mιd$(DateStr, 8) & "yy"~Posιtιon = Position + 2~Case DateStr Like "*[dD][dD][dD][mM][mM][mM][mM][idDmMyY][idDmMyY]"~Buffer = MιdS(DateStr, 3, 6) & MιdS(DateStr, 11 , 1 ) & "yy"~Posιtιon = Position + 2~Case DateStr Like "*[mM][mM][mM][dD][dD][dD][dD][idDmMyY][idDmMyY]"~Buffer = MιdS(DateStr, 3, 6) & MιdS(DateStr, 1 1 1 ) &
"yy"~Posιtιon = Position + 2-Case DateStr Like "* [mM][mM][mM][mM][idDmMyY][ldDmMyY]"~Buffer = MιdS(DateStr, 6, 5) & "yy"~Posιtιon = Position + 4~Case DateStr Like "* [dD][dD][dD][dD][idDmMyY][idDmMyY]"~Buffer = MιdS(DateStr 6, 5) & "yy"~Posιtιon = Position + 4~Case DateStr Like "* [dDj['dDmMyY][idDmMyY][mM][mM][mM] -Buffer = "d' &
MιdS(DateStr, 8) & "yy"~Posιtιon = Position + 4~Case DateStr Like "* [mM][idDmMyY][idDmMyY][dD][dD][dD]' -Buffer = "m" & Mιd$(DateStr, 8) & "yy"~Posιtιon = Position + 4~Case DateStr Like
"*[dD][idDmMyY][idDmMyY][mM][mM][mM][mM][idDmMyY]"~Buffer = MιdS(DateStr, 4, 2) & MιdS(DateStr, 8) & "yy"~Posιtιon = Position + 3-Case DateStr Like "*[mM][idDmMyY][idDmMyY][dD][dD][dD][dD][idDmMyY]"~Buffer = MιdS(DateStr, 4, 2) & MιdS(DateStr, 8) & "yy"~Posιtιon = Position + 3-Case DateStr Like
"*[dD][idDmMyY][mM][mM][mM][mM][idDmMyY][idDmMyY]"~Buffer = Mιd$(DateStr, 4 5) & MιdS(DateStr, 1 1 , 1 ) & "yy"-Posιtιon = Position + 3-Case DateStr Like "*[mM]['dDmMyY][dD][dD][dD][dD][idDmMyY][idDmMyY]"~Buffer = Mιd$(DateStr 4, 5) & MιdS(DateStr, 1 1 , 1) & "yy"~Posιtιon = Position + 3-Case DateStr Like "♦[dD DJti DmMyYH'dDm yYHm Hm HrnMJ dDmMyYr-Buffer = MιdS(DateStr, 4, 3) & Mιd$(DateStr, 9) & "yy"~Posιtιon = Position + 3-Case DateStr Like "*[mM][mM][idDmMyY][idDmMyY][dD][dD][dD][idDmMyY]"~Buffer = Mιd$(DateStr, 4, 3) & MιdS(DateStr, 9) & "yy"~Posιtιon = Position + 3-Case DateStr Like
"*[dD][dD][idDmMyY][mM][mM][mM][idDmMyY][idDmMyY]"~Buffer = Mιd$(DateStr, 4, 5) & MιdS(DateStr, 11 , 1 ) & "yy"~Posιtιon = Position + 3-Case DateStr Like "*[mM][mM][idDmMyY][dD][dD][dD][idDmMyY][idDmMyY]"~Buffer = Mιd$(DateStr, 4, 5) & Mιd$(DateStr, 11 , 1) & "yy"~Posιtιon = Position + 3-Case DateStr Like "*[dD][dD][dD][idDmMyY][idDmMyY][mM][mM][idDmMyY]"~Buffer = MιdS(DateStr, 4, 2) & Mιd$(DateStr, 8) &
"yy"~Posιtιon = Position + 3-Case DateStr Like "*[mM][mM][mM][idDmMyY]['dDmMyY][dD][dD][idDmMyY]"~Buffer = Mιd$(DateStr, 4, 2) & MιdS(DateStr, 8) & "yy"~Posιtιon = Position + 3-Case DateStr Like
"*[dD][dD][dD][idDmMyY][mM][mM][idDmMyY][idDmMyY]"~Buffer = MιdS(DateStr, 5, 6) & "yy"~Posιtιon = Position + 3-Case DateStr Like "*[mM][mM][mM][idDmMyY][dD][dD][idDmMyY][idDmMyY]"~Buffer = MιdS(DateStr, 5, 6) & "yy"~Posιtιon = Position + 3-Case DateStr Like "*[dD][dD][dD][dD][idDmMyY][idDmMyY][mM][idDmMyY]"~Buffer = Mιd$(DateStr, 4, 3) & Mιd$(DateStr, 9) & "yy"~Posιtιon = Position + 3-Case DateStr Like "*[mM][mM][mM][mM][idDmMyY][idDmMyY][dD][idDmMyY]"~Buffer = Mιd$(DateStr, 4, 3) & MιdS(DateStr, 9) & "yy"~Posιtιon = Position + 3-Case DateStr Like "*[dD][dD][dD][dD][idDmMyY][mM]['dDmMyY][idDmMyY]"~Buffer = MιdS(DateStr, 4, 3) & Mιd$(DateStr, 9) & "yy"~Posιtιon = Position + 3-Case DateStr Like "*[mM][mM][mM][mM][idDmMyY][dD][idDmMyY][idDmMyY]"~Buffer = MιdS(DateStr, 4, 3) & Mιd$(DateStr, 9) &
"yy"~Posιtιon = Position + 3-Case DateStr Like "*[dD][dD][idDmMyY][idDmMyY][mM][mM][mM][mM]"~Buffer = MιdS(DateStr, 4, 3) & Mιd$(DateStr, 9) & "yy"~Posιtιon = Position + 3-Case DateStr Like
"*[mM][mM][idDmMyY][idDmMyY][dD][dD][dD][dD]"~Buffer = Mιd$(DateStr, 4, 3) & Mιd$(DateStr, 9) & "yy"~Posιtιon = Position + 3-Case DateStr Like "*[dD][dD][dD][idDmMyY][idDmMyY][mM][mM][mM]"~Buffer = MιdS(DateStr, 4 4) & Mιd$(DateStr, 10) & "yy"~Posιtιon = Position + 3-Case DateStr Like
"*[mM][mM][mM][idDmMyY][idDmMyY][dD][dD][dD]"~Buffer = Mιd$(DateStr 4, 4) & Mιd$(DateStr, 10) & "yy1 -Position = Position + 3-Case DateStr Like "*[dD][dD][dD][dD][idDmMyY][idDmMyY][mM][mM]"~Buffer = MιdS(DateStr, 4, 3) & Mιd$(DateStr, 9) & "yy"~Posιtιon = Position + 3-Case DateStr Like "*[mM][mM][mM][mM][idDmMyY][idDmMyY][dD][dD]"~Buffer = Mιd$(DateStr, 4, 3) & MιdS(DateStr 9) & "yy"~Posιtιon = Position + 3-Case DateStr Like "*[mM][mM][dD][dD][dD][dD][idDmMyY][>dDmMyY]"~Buffer = Mιd$(DateStr, 4 5) &
Mιd$(DateStr, 11 , 1 ) & "yy"~Posιtιon = Position + 3-Case DateStr Like
"*[dD][dD][mM][mM][mM][mM][ldDmMyY][idDmMyY]"-Buffer = MιdS(DateStr, 4, 5) & MιdS(DateStr 11 , 1 ) & "yy"~Posιtιon = Position + 3-Case DateStr Like "*[dD][dD]['dDmMyY][mM][mM][idDmMyY][idDmMyY]"-Buffer = MιdS(DateStr, 6, 5) & "yy"~Posιtιon = Position + 4~Case DateStr Like "*[mM][mM][idDmMyY][dD][dD][idDmMyY][idDmMyY]"~Buffer = Mιd$(DateStr, 6, 5) & "yy"~Posιtιoπ = Position + 4~Case DateStr Like
"*[dD][dD][idDmMyY][idDmMyY][mM][mM][>dDmMyY]"~Buffer = "d" & Mιd$(DateStr, 8) & "yy"~Posιtιon = Position + 4~Case DateStr Like "*[mM][mM][ldDmMyY][idDmMyY][dD][dD][idDmMyY]"~Buffer = "m" & MιdS(DateStr, 8) & "yy"~Posιtιon = Position + 4~Case DateStr Like "* [dD][idDmMyY][idDmMyY][mM][mM][idDmMyY]"~Buffer = "d" & Mιd$(DateStr, 8) & "yy"~Posιtιon = Position + 4~Case DateStr Like "* [mM][idDmMyY][idDmMyY][dD][dD][idDmMyY]"~Buffer = "m" & Mιd$(DateStr 8) & "yy"~Posιtιon = Position + 4~Case
DateStr Like "* [dD][idDmMyY][mM][mM][idDmMyY][idDmMyY]' -Buffer = Mιd$(DateStr, 6 5) & "yy' -Position = Position + 4~Case DateStr Like "* [mM][idDmMyY][dD][dD][idDmMyY][>dDmMyY]"~Buffer = MιdS(DateStr, 6, 5) & "yy"~Posιtιon = Position + 4~Case DateStr Like "* [dD][dD]['dDmMyY][idDmMyY][mM][idDmMyY]"~Buffer = "dd" & MιdS(DateStr, 9) & "yy"~Posιtιon = Position + 4~Case DateStr Like "* [mM][mM][idDmMyY][>dDmMyY][dD][idDmMyY]"~Buffer = "mm" & Mιd$(DateStr, 9) & "yy"~Posιtιon = Position + 4~Case DateStr Like "*
[dD][dD][idDmMyY][mM]['dDmMyY][idDmMyY]"~Buffer = Mιd$(DateStr, 6, 5) & "yy"~Posιtιon = Position + 4~Case DateStr Like "* [mM][mM][idDmMyY][dD][idDmMyY][idDmMyY]"~Buffer = Mιd$(DateStr, 6, 5) & "yy"~Posιtιon = Position + 4~Case DateStr Like "* [dD][dD][dD][idDmMyY]pdDmMyY]"~Buffer = Mιd$(DateStr, 7, 4) & "yy"~Posιtιon = Position + 4~Case DateStr Like "* [mM][mM][mM][idDmMyY][idDmMyY]"~Buffer = Mιd$(DateStr, 7, 4) & "yy"~Posιtιon = Position + 4~Case DateStr Like "*[dD][idDmMyY][mM][mM][mM][idDmMyY][idDmMyY]"~Buffer = Mιd$(DateStr, 5, 4) &
Mιd$(DateStr, 11 , 1 ) & "yy"~Posιtιon = Position + 4~Case DateStr Like
"*[mM][idDmMyY][dD][dD][dD][ldDmMyY][idDmMyY]"~Buffer = MιdS(DateStr, 5, 4) & Mιd$(DateStr, 11 , 1 ) & "yy"~Posιtιon = Position + 4~Case DateStr Like "*[dD][idDmMyY][idDmMyY][mM][mM][mM][idDmMyY]"~Buffer = Mιd$(DateStr, 5, 2) & Mιd$(DateStr, 9) & "yy"~Posιtιon = Position + 4~Case DateStr Like "*[mM][idDmMyY]['dDmMyY][dD][dD][dD][idDmMyY]"~Buffer = MιdS(DateStr, 5, 2) & Mιd$(DateStr, 9) & "yy"~Posιtιon = Position + 4~Case DateStr Like "*[dD][dD][dD][idDmMyY][mM][idDmMyY][idDmMyY]"~Buffer = Mιd$(DateStr, 6 5) & "yy"~Posιtιon = Position + 4~Case DateStr Like "*[mM][mM][mM][idDmMyY][dD][idDmMyY][idDmMyY]"-Buffer = MιdS(DateStr, 6 5) & "yy"~Posιtιon = Position + 4~Case DateStr Like "*[dD][dD][dD][idDmMyY][idDmMyY][mM][idDmMyY]"~Buffer = Mιd$(DateStr, 5, 2) & Mιd$(DateStr, 9) & "yy"~Posιtιon = Position + 4~Case DateStr Like "*[mM][mM][mM][idDmMyY][idDmMyY][dD][idDmMyY]"~Buffer = MιdS(DateStr, 5, 2) &
MιdS(DateStr, 9) & "yy"~Posιtιon = Position + 4~Case DateStr Like
"*[dD][ lDmMyY][idDmMyY][mM][mM][mM][rnM]''~Buffer = MιdS(DateStr, 5, 2) & Mιd$(DateStr, 9) & "yy"~Posιtιon = Position + 4~Case DateStr Like "*[mM][idDmMyY][idDmMyY][dD][dD][dD][dD]"~Buffer = Mιd$(DateStr, 5, 2) & MιdS(DateStr, 9) & "yy"~Posιtιoπ = Position + 4~Case DateStr Like "*[dD][dD][idDmMyY][idDmMyY][mM][mM][mM]"~Buffer = Mιd$(DateStr 5, 3) & Mιd$(DateStr, 10) & "yy"~Posιtιon = Position + 4~Caεe DateStr Like "*[mM][mM][idDmMyY][idDmMyY][dD][dD][dD]"~Buffer = MιdS(DateStr, 5, 3) & Mιd$(DateStr 10) & "yy"~Posιtιon = Position + 4~Case DateStr Like "*[dD][dD][dD][idDmMyY][idDmMyY][mM][mM]"~Buffer = MιdS(DateStr 5 2) & MιdS(DateStr, 9) & "yy"~Posιtιon =
Position + 4-Case DateStr Like "*[mM][mM][mM][idDmMyY][idDmMyY][dD][dD]"~Bufτer = MιdS(DateStr, 5, 2) & Mιd$(DateStr, 9) & "yy"~Posιtιon = Position + 4~Case DateStr Like
"*[dD][mM][mM][mM][mM][idDmMyY][idDmMyY]"~Buffer = MιdS(DateStr 5 4) & MιdS(DateStr, 11 , 1 ) & "yy"~Posιtιon = Position + 4~Case DateStr Like "*[mM][dD][dD][dD][dD]['dDmMyY][ldDmMyY]' -Buffer = Mιd$(DateStr, 5 4) & Mιd$(DateStr, 1 1 , 1 ) & "yy"~Posιtιon = Position + 4~Case DateStr Like
"*[dD][dD][idDmMyY][idDmMyY][mM][mM]"~Buffer = "d" & Mιd$(DateStr, 9) & "yy"~Posιtιon = Position + 5~Case DateStr Like "'[mMltmMHidDmMyYH'dDmMyY dDHdD -Buffer = "m" & MιdS(DateStr 9) & ' yy"~Posιtιon = Position + 5~Case DateStr Like "* [dD][mM][mM][idDmMyY][idDmMyY]"~Buffer = Mιd$(DateStr, 7 4) & "yy"~Posιtιon = Position + 5~Case DateStr Like "* [mM][dD]idD][idDmMyY][idDmMyY]"~Buffer = MιdS(DateStr 7, 4) & "yy"~Posιtιon = Position + 5~Case DateStr Like "* [dD][idDmMyY][mM][idDmMyY][idDmMyY]"~Buffer = MιdS(DateStr 7 4) & "yy"~Posιtιon = Position +
5~Case DateStr Like "* [mM][idDmMyY][dD][idDmMyY][idDmMyY]"~Buffer = Mιd$(DateStr, 7, 4) & "yy"~Posιtιon = Position + 5~Case DateStr Like "* [dDH'dDm yYHidDmMyYHmMHidDmMyY]' -Buffer = "d" & Mιd$(DateStr, 9) & "yy"~Posιtιon = Position + 5~Case DateStr Like "* [mM][idDmMyY]PdDmMyY][dD][idDmMyY]"~Buffer = "m" & Mιd$(DateStr, 9) & "yy"-Posιtιon = Position + 5~Case DateStr Like "* [dD][dD][mM][idDmMyY][idDmMyY]"~Buffer = Mιd$(DateStr, 7, 4) & "yy"~Posιtιon = Position + 5~Case DateStr Like "* [mM][mM][dD][idDmMyY][idDmMyY]"~Buffer = Mιd$(DateStr, 7, 4) & "yy"~Posιtιon = Position + 5~Case DateStr Like "* [dD][ldDmMyY][idDmMyY][mM][mM]"~Buffer = "d" & Mιd$(DateStr, 9) & "yy"-Posιtιon = Position + 5-Case DateStr Like "* [mM][idDmMyY][idDmMyY][dD][dD]"~Buffer = "m" & Mιd$(DateStr, 9) & "yy"~Posιtιon = Position + 5-Case DateStr Like "* [dD][dD][idDmMyY][idDmMyY][mM]"~Buffer = Mιd$(DateStr, 7, 3) & Mιd$(DateStr, 11 , 1) & "yy"~Posιtιon = Position + 5-Case DateStr Like "* [mM][mM][idDmMyY][idDmMyY][dD]"~Buffer = MιdS(DateStr, 7, 3) & Mιd$(DateStr, 11 , 1 ) & "yy"~Posιtιon = Position + 5-Case DateStr Like "*[mM][mM][mM][mM][idDmMyY][ldDmMyY]"~Buffer = Mιd$(DateStr, 7, 4) & "yy"~Posιtιon = Position + 5-Case DateStr Like "*[dD][dD][dD][dD][idDmMyY][idDmMyY]"~Buffer = MιdS(DateStr, 7, 4) & "yy"~Posιtιon = Position + 5-Case DateStr Like "*[dD][idDmMyY][idDmMyY][mM][mM][mM]"~Buffer = Mιd$(DateStr, 6, 2) & Mιd$(DateStr, 10) & "yy"~Posιtιon = Position + 5-Case DateStr Like "*[mM][idDmMyY][idDmMyY][dD][dD][dD]"~Buffer = Mιd$(DateStr, 6, 2) & MιdS(DateStr, 10) & "yy"~Posιtιon = Position + 5-Case DateStr Like "*
[mM][mM][idDmMyY][idDmMyY]"~Buffer = Mιd$(DateStr, 8, 3) & "yy"-Posιtιon = Position + 6~Case DateStr Like "* [dD][dD][idDmMyY][idDmMyY]"~Buffer = Mιd$(DateStr, 8, 3) & "yy"~Posιtιon = Position + 6~Case DateStr Like "* [dD][idDmMyY][idDmMyY][mM]"~Buffer = "d" & MιdS(DateStr, 10) & "yy"~Posιtιon = Position + 6~Case DateStr Like "* [mM][idDmMyY][idDmMyY][[dD]"~Buffer = "m" & Mιd$(DateStr, 10) & "yy"~Posιtιon = Position + 6~Case DateStr Like "*[dD][idDmMyY][mM][mM][idDmMyY][idDmMyY]"~Buffer = Mιd$(DateStr 6, 3) & Mιd$(DateStr, 11 , 1 ) & "yy"~Posιtιon = Position + 5-Case DateStr Like "*[mM][idDmMyY]FdD][dD]pdDmMyY][idDmMyY]"~Buffer = Mιd$(DateStr 6, 3) & Mιd$(DateStr, 11 , 1 ) & "yy"~Posιtιon = Position + 5-Case DateStr Like
"*[dD][idDmMyY][idDmMyY][mM][mM][idDmMyY]"-Buffer = MιdS(DateStr, 6 2) & Mιd$(DateStr, 10) & "yy"~Posιtιon = Position + 5-Case DateStr Like "*[mM][idDmMyY][idDmMyY][dD][dD][idDmMyY]"~Buffer = MιdS(DateStr, 6, 2) & Mιd$(DateStr, 10) & "yy"~Posιtιon = Position + 5-Case DateStr Like "*[dD][dD][mM][rnM]['dDmMyY][idDmMyY]"~Buffer = Mιd$(DateStr, 7, 4) & "yy"~Posιtιon = Position + 5-Case DateStr Like "*[mM][mM][dD][dD][idDmMyY][idDmMyY]"~Buffer = Mιd$(DateStr, 7, 4) & "yy"~Posιtιoπ = Position + 5-Case DateStr Like
"*[dD][dDHldDmMyY][mM][idDmMyY][idDmMyY]"~Buffer = Mιd$(DateStr 7 4) & "yy"~Posιtιon = Position + 5-Case DateStr Like "*[mM][mM][ldDmMyY][dD][idDmMyY][ldDmMyY]"~Buffer = Mιd$(DateStr 7, 4) & "yy"~Posιtιon = Position + 5-Case DateStr Like "*[dDHdD][idDmMyY][idDmMyY][mM][idDmMyY]' -Buffer = ' d" & MιdS(DateStr, 9) & "yy"~Posιtιon = Position + 5-Case DateStr Like "*[mM][mM][idDmMyY][idDmMyY][dD][ldDmMyY]' -Buffer = "m" & MιdS(DateStr, 9) & "yy"~Posιtιon = Position + 5-Case DateStr Like "*[dD][dD][dD][idDmMyY][ldDmMyY]"~Buffer = MιdS(DateStr, 8, 3) & "yy"~Posιtιon = Position + 6-Case DateStr Like "*[mM][mM][mM][idDmMyY]['dDmMyY]"~Buffer = MιdS(DateStr 8 3) & "yy"~Posιtιon = Position + 6~Case DateStr Like "*[mM][dD][dD][idDmMyY][idDmMyY]' -Buffer = "md" & MιdS(DateStr, 1 1 1 ) & "yy"-Posιtιon = Position + 6~Case DateStr Like "*[dD][mM][mM][idDmMyY][ldDmMyY]"~Buffer = ' dm" &
MιdS(DateStr, 1 1 , 1 ) & "yy"~Posιtιon = Position + 6~Case DateStr Like
"*[dD][idDmMyY][mM][idDmMyY][idDmMyY]"~Buffer = Mιd$(DateStr 7 3) & "yy' -Position = Position + 6~Case DateStr Like "*[mM][idDmMyY][dD][idDmMyY][idDmMyY]"~Buffer = Mιd$(DateStr, 7, 3) & ' yy' -Position = Position + 6~Case DateStr Like "*[dD][idDmMyY][idDmMyY][mM][idDmMyY]"~Buffer = MιdS(DateStr, 7 2) & "myy"~Posιtιon = Position + 6~Case DateStr Like "*[mM][idDmMyY][idDmMyY][dD][!dDmMyY]"~Buffer = Mιd$(DateStr, 7, 2) & "dyy"-Posιtιon = Position + 6~Case DateStr Like "*[dD][dD][mM][idDmMyY][idDmMyY]' -Buffer = MιdS(DateStr, 8, 3) & "yy"~Posιtιon = Position + 6~Case DateStr Like "*[mM][mM][dD][idDmMyY][idDmMyY]"~Buffer = MιdS(DateStr, 8, 3) & "yy"~Posιtιon = Position + 6~Case DateStr Like "*[dD][idDmMyY][idDmMyY][mM][mM]"~Buffer = MιdS(DateStr, 7 2) & "myy"~Posιtιoπ = Position + 6~Case DateStr Like "*[mM][idDmMyY][idDmMyY][dD][dD]"~Buffer = MιdS(DateStr, 7, 2) & "dyy"~Posιtιon = Position + 6~Case DateStr Like "*[dD][dD][idDmMyY]['dDmMyY][mM]"~Buffer = "d1 & Mιd$(DateStr, 10) & "yy"-Posιtιon
= Position + 6~Case DateStr Like "*[mM][mM][idDmMyY][idDmMyY][dD]"~Buffer = "m" & Mιd$(DateStr, 10) & "yy"~Posιtιon = Position + 6~Case DateStr Like "*[dD][dD][idDmMyY][idDmMyY]"~Buffer = "d" & MιdS(DateStr, 1 1 , 1 ) & "yy"~Posιtιon = Position + 7~Case DateStr Like "*[mM][mM][idDmMyY][idDmMyY]"~Buffer = "m" & MιdS(DateStr, 11 , 1 ) & "yy"~Posιtιon = Position + 7~Case Else-Buffer = ""-End Select-End bub- - ReplaceLeft_j is the third group(of three groups) of short date~'"*formats where yy appears on the right hand side Two characters are~'*"removed (usually non date characters) and an additional two yy's are~'"*ιnserted, to create a long date format - -Public Sub ReplaceLeft_3(DateStr As String,
Pos_Left As Long)~Dιm Rp As Integer-Position = 0~Buffer = ""-Position = Pos_Left~Rp = 11 - Len(DateStr)~Select Case True-Case DateStr Like "*[dD][dD][dD][dD][idDmMyY][mM][mM][mM][mM][idDmMyY]"~Buffer = MιdS(DateStr, 3, 4) & Mιd$(DateStr 8) & "yy"~Posιtιon = Position + 1 -Case DateStr Like
"*[mM][mM][mM][mM][idDmMyY][dD][dD][dD][dD][idDmMyY]"~Buffer = Mιd$(DateStr, 3, 4) & MιdS(DateStr 8) & "yy"~Posιtιon = Position + 1 ~Case DateStr Like "* [dD][idDmMyY][mM][mM][mM][mM][idDmMyY]"~Buffer = Mιd$(DateStr, 5 2) & Mιd$(DateStr, 8) & "yy"~Posιtιon = Position + 3-Case DateStr Like "* [mM][idDmMyY][dD][dD][dD][dD][idDmMyY]"~Buffer = MιdS(DateStr, 5, 2) & MιdS(DateStr, 8) & "yy"-Posιtιon = Position + 3-Case DateStr Like "* [dD][dD][idDmMyY][mM][mM][mM][idDmMyY]"~Buffer = MιoS(DateStr 5, 3) & Mιd$(DateStr 9) & "yy"~Posιtιon = Position + 3-Case DateStr Like "* [mM][mM][idDmMyY][dD][dD][dD][idDmMyY] '-Buffer = MιdS(DateStr, 5 3) & MιdS(DateStr 9) & "yy"~Posιtιon = Position + 3-Case DateStr Like ' *
[dD][dD][dD][idDmMyY][mM][mM][idDmMyY]"~Buffer = Mιd$(DateStr 6) & ' yy"~Posιtιon = Position + 3-Case DateStr Like "* [mM][mM][mM][idDmMyY][dD][dD][idDmMyY]"~Buffer = Mιd$(DateStr, 6) & "yy"-Posιtιon = Position + 3-Case DateStr Like "* [dD][dD][dD][dD][idDmMyY][mM][idDmMyY]"~Buffer = Mιd$(DateStr, 6) & "yy"~Posιtιon = Position + 3-Case DateStr Like "* [mM][mM][mM][mM][idDmMyY][dD][idDmMyY]"~Buffer = MιdS(DateStr, 6) & "yy"~Posιtιon = Position + 3-Case DateStr Like "* [dD][dD][idDmMyY][mM][mM][mM][mM]"~Buffer = Mιd$(DateStr, 5, 6) & "yy"~Posιtιon = Position + 3-Case DateStr Like "* [mM][mM][idDmMyY][dD][dD][dD][dD]"~Buffer = Mιd$(DateStr, 5, 6) & "yy"~Posιtιon = Position + 3-Case DateStr Like "* idD][dD][dD][idDmMyY][mM][mM][mM]"~Buffer = MιdS(DateStr, 5, 6) & "yy"~Posιtιon = Position + 3-Case DateStr Like "* [mM][mM][mM][idDmMyY][dD][dD][dD]"~Buffer = Mιd$(DateStr, 5, 6) & "yy"~Posιtιon = Position + 3~Caεe DateStr Like "* [dD][dD][dD][dD][idDmMyY][mM][mM]"~Buffer = MιdS(DateStr, 6) & "yy"~Posιtιon = Position + 3-Case DateStr Like "* [mM][mM][mM][mM]['dDmMyY][dD][dD]"~Buffer = Mιd$(DateStr, 6) & "yy"~Posιtιon = Position + 3-Case DateStr Like "* [dD][dD][idDmMyY][mM][mM][mM][mM]"~Buffer = "dd" & Mιd$(DateStr, 8) & "yy"~Posιtιon = Position + 3-Case DateStr Like "* [mM][mM][idDmMyY][dD][dD][dD][dD]"~Buffer = "mm" & MιdS(DateStr, 8) & "yy"~Posιtιon = Position + 3-Case DateStr Like "* [dD][dD][dD][dD][mM][mM][mM]"~Buffer = Mιd$(DateStr, 6) & "yy"~Posιtιon = Position + 3-Case DateStr Like "* [mM][mM][mM][mM][dD][dD][dD]"-Buffer = Mιd$(DateStr, 6) & "yy"~Posιtιon = Position + 3-Case DateStr Like "*[dD][dD][dD][idDmMyY][mM][mM][mM][mM][idDmMyY]"~Buffer = Mιd$(DateStr, 4, 3) & Mιd$(DateStr, 8) & "yy"~Posιtιon = Position + 2~Case DateStr Like
"*[mM][mM][mM][idDmMyY][dD][dD][dD][dD][idDmMyY]"~Buffer = Mιd$(DateStr, 4, 3) & MιdS(DateStr, 8) & "yy"~Posιtιoπ = Position + 2~Case DateStr Like "*[dD][dD][dD][dD][idDmMyY][mM][mM][mM][idDmMyY]"~Buffer = MιdS(DateStr, 4, 4) & Mιd$(DateStr, 9) & "yy"~Posιtιon = Position + 2~Case DateStr Like "*[mM][mM][mM][mM][idDmMyY][dD][dD][dD][idDmMyY]"~Buffer = Mιd$(DateStr, 4, 4) & Mιd$(DateStr, 9) & "yy"~Posιtιon = Position + 2~Case DateStr Like "*[dD][dD][dD][dD][idDmMyY][mM][mM][mM][mM]"~Buffer = Mιd$(DateStr, 4, 7) & "yy"~Posιtιon = Position + 2~Case DateStr Like
"*[mM][mM][mM][mM][idDmMyY][dD][dD][dD][dD]"~Buffer = Mιd$(DateStr, 4, 7) & "yy"~Posιtιon = Position + 2~Case DateStr Like "*[dD][dD][dD][dD][mM][mM][mM][mM]['dDmMyY]"~Buffer = Mιd$(DateStr, 3, 3) & Mιd$(DateStr, 8) & "yy"~Posιtιon = Position + 2-Case DateStr Like "*[mM][mM][mM][mM][dD][dD][dD][dD][idDmMyY]"~Buffer = Mιd$(DateStr, 3, 3) & MιdS(DateStr, 8) & "yy"~Posιtιon = Position + 2~Case DateStr Like "*
[dD][idDmMyY][mM][mM][mM][idDmMyY]"~Buffer = Mιd$(DateStr, 6, 2) & MιdS(DateStr, 9) & "yy"~Posιtιon = Position + 4~Case DateStr Like "* [mM][idDmMyY][dD][dD][dD][idDmMyY]"~Buffer = Mιd$(DateStr, 6, 2) & Mιd$(DateStr, 9) & "yy"~Posιtιon = Position + 4~Case DateStr Like "* [dD][dD][dD]pdDmMyY][mM][idDmMyY]"~Buffer = Mιd$(DateΞtr, 7) & "yy"~Posιtιon = Position + 4~Case DateStr Like "* [mM][mM][mM][idDmMyY][dD][idDmMyY]"-Buffer = Mιd$(DateStr, 7) & "yy"~Posιtιon = Position + 4~Case DateStr Like "* [dD][idDmMyY][mM][mM][mM][mM]"~Buffer = Mιd$(DateStr, 6, 5) & "yy"~Posιtιon = Position + 4~Case DateStr Like "* [mM][!dDmMyY][dD][dD][dD][dD]"~Buffer = MιdS(DateStr, 6, 5) & "yy"~Posιtιon = Position + 4~Case DateStr Like "* [dD][dD]['dDmMyY][mM][mM][mM]"~Buffer = Mιd$(DateStr, 6, 5) & "yy"~Posιtιon = Position + 4~Case DateStr Like "* [mM][mM][idDmMyY][dD][dD][dD]"~Buffer = Mιd$(DateStr, 6, 5) & "yy"~Posιtιon = Position + 4~Case DateStr Like "* [dD][dD][dD][idDmMyY][mM][mM]"~Buffer = MιdS(DateStr, 7) & "yy"~Posιtιon = Position + 4~Case DateStr Like "* [mM][mM][mM]PdDmMyY][dD][dD]"~Buffer = MιdS(DateStr, 7) & "yy"~Posιtιon = Position + 4~Case DateStr Like "* [dD][dD][dD][dD][idDmMyY][mM]"~Buffer = Mιd$(DateStr, 7) & "yy"~Posιtιon = Position + 4~Case DateStr Like "* [mM][mM][mM][mM][idDmMyY][dD]"~Buffer = Mιd$(DateStr, 7) & "yy"~Posιtιon = Position + 4~Case DateStr Like "* [dD][mM][mM][mM][mM][idDmMyY]"~Buffer = "d" & Mιd$(DateStr, 8) & "yy"~Posιtιon = Position + 4~Case DateStr Like "* [mM][dD][dD][dD][dD][idDmMyY]"~Buffer = "m" & MιdS(DateStr, 8) & "yy"~Posιtιon = Position + 4~Case DateStr Like "* [dD][dD][dD][mM][mM][mM)"~Buffer = Mιd$(DateStr, 7) & "yy"~Posιtιon = Position + 4~Case DateStr Like "* [mM][mM][mM][dD][dD][dD]"~Buffer = Mιd$(DateStr 7) & "yy"~Posιtιon = Position •<- 4~Case DateStr Like "* [dD][dD][dD][dD][mM][mM]"~Buffer = MιdS(DateStr, 7) & "yy"~Posιtιon = Position + 4~Case DateStr Like "* [mM][mM][mM][mM][dD][dD]"~Buffer = MιdS(DateStr, 7) & "yy"~Posιtιon = Position + 4~Case DateStr Like "*[dD][dD][idDmMyY][mM][mM][mM][mM][idDmMyY]"~Buffer = MιdS(DateStr, 4, 3) & Mιd$(DateStr, 9) & "yy"~Posιtιon =
Position + 3-Case DateStr Like "*[mM][mM][idDmMyY][dD][dD][dD][dD][idDmMyY]"~Buffer = Mιd$(DateStr, 4, 3) & Mιd$(DateStr 9) & "yy"~Posιtιon = Position + 3-Case DateStr Like
"*[dD][dD][dD][idDmMyY][mM][mM][mM][idDmMyY]"~Buffer = Mιd$(DateStr, 5, 3) & Mιd$(DateStr, 9) & "yy"~Posιtιon = Position + 3-Case DateStr Like "*[mM][mM][mM][idDmMyY][dD][dD][dD][idDmMyY]"~Buffer = Mιd$(DateStr, 5, 3) & Mιd$(DateStr, 9) & "yy"~Posιtιon = Position + 3-Case DateStr Like
"*[dD][dD][dD][dD][idDmMyY][mM][mM][idDmMyY]"~Buffer = Mιd$(DateStr, 6) & "yy"~Posιtιon = Position + 3-Case DateStr Like "*[mM][mM][mM][mM][idDmMyY][dD][dD]['dDmMyY]"~Buffer = Mιd$(DateStr, 6) & "yy"~Posιtιon = Position + 3-Case DateStr Like "*[dD][dD][dD][idDmMyY][mM][mM][mM][mM]"~Buffer = MιdS(DateStr, 5, 3) & Mιd$(DateStr, 9) & "yy"~Posιtιon = Position + 3-Case DateStr Like "*[mM][mM][mM][idDmMyY][dD][dD][dD][dD]"~Buffer = Mιd$(DateStr, 5, 3) & Mιd$(DateStr, 9) & "yy"~Posιtιon = Position + 3-Case DateStr Like
"*[dD][dD][dD][dD][idDmMyY][mM][mM][mM]"~Buffer = Mιd$(DateStr, 5, 6) & "yy"~Posιtιon = Position + 3-Case DateStr Like "*[mM][mM][mM][mM][ldDmMyY][dD][dD][dD]"~Buffer = Mιd$(DateStr, 5, 6) & "yy"~Posιtιon = Position + 3-Case DateStr Like "*[dD][dD][dD][mM][mM][mM][mM][idDmMyY]"~Buffer = "dd" & MιdS(DateStr, 8) & "yy"~Posιtιon = Position + 3-Case DateStr Like "*[mM][mM][mM][dD][dD][dD][dD][idDmMyY]"-Buffer = "mm" & MιdS(DateStr, 8) & "yy"-Posιtιon = Position + 3-Case DateStr Like "* [mM][mM][mM][mM][idDmMyY]"~Buffer = Mιd$(DateStr, 8) & "yy"~Posιtιon = Position + 5-Case DateStr Like "* [dD][dD][dD][dD][idDmMyY]"~Buffer = MιdS(DateStr, 8) & "yy"~Posιtιon = Position + 5-Case DateStr Like "* [dD][idDmMyY][mM][mM][mM]"~Buffer = Mιd$(DateStr, 7, 4) & "yy"~Posιtιon = Position + 5-Case DateStr Like "* [mM][idDmMyY][dD][dD][dD]"~Buffer = Mιd$(DateStr, 7, 4) & "yy"~Posιtιoπ = Position + 5-Case DateStr Like "* [dD][dD][mM][mM][mM]"~Buffer = MιdS(DateStr, 7, 4) & "yy"~Posιtιon = Position + 5-Case DateStr Like "* ϊmM][mM][dD][dD][dD]"~Buffer = Mιd$(DateStr, 7, 4) & "yy"~Posιtιon = Position + 5-Case DateStr Like "*
[dD][dD][dD][mM][mM]"~Buffer = Mιd$(DateStr, 8) & "yy"~Posιtιon = Position + 5-Case DateStr Like "* [mM][mM][mM][dD][dD]"~Buffer = Mιd$(DateStr, 8) & "yy"~Posιtιon = Position + 5-Case DateStr Like "* [dD][dD][dD][dD][mM]"~Buffer = MιdS(DateStr, 8) & "yy"~Posιtιon = Position + 5-Case DateStr Like "* [mM][mM][mM][mM][dD]"~Buffer = MιdS(DateStr, 8) & "yy"~Posιtιon = Position + 5-Case DateStr Like "*[dD][idDmMyY][mM][mM][mM][mM][ldDmMyY]"~Buffer = Mιd$(DateStr 5 4) & MιdS(DateStr, 1 1 , 1 ) & "yy"~Posιtιon = Position + 4-Case DateStr Like "*[mM][ldDmMyY][dD][dD][dD][dD][ldDmMyY]"~Buffer = MιdS(DateStr, 5 4) & Mιd$(DateStr, 1 1 1 ) & ' yy"~Posιtιon = Position + 4-Case DateStr Like "•[dDltdDH'dDmMyYltm llmMlIm lIidDmMyYr-Buffer = MιdS(DateStr 6 2) & MιdS(DateStr 9) & "yy"~Posιtιon =
Position + 4-Case DateStr Like "*[mM][mM][idDmMyY][dD][dD][dD][idDmMyY]"~Buffer = Mιd$(DateStr, 6, 2) & Mιd$(DateStr, 9) & "yy"~Posιtιon = Position + 4-Case DateStr Like
"*[dD][dD][dD][idDmMyY][mM][mM][idDmMyY]"~Buffer = Mιd$(DateStr, 6, 3) & MιdS(DateStr, 10) & "yy"~Posιtιon = Position + 4-Case DateStr Like "*[mM][mM][mM][idDmMyY][dD][dD][idDmMyY]"~Buffer = Mιd$(DateStr 6, 3) & Mιd$(DateStr, 10) & "yy' -Position = Position + 4-Case DateStr Like
"*[dD][dD][dD][dD][idDmMyY][mM][idDmMyY]"~Buffer = Mιd$(DateStr, 7) & "yy"~Posιtιon = Position + 4-Case DateStr Like "*[mM][mM][mM][mM][idDmMyY][dD][idDmMyY]"~Buffer = Mιd$(DateStr, 7) & "yy"~Posιtιon = Position + 4-Case DateStr Like "*[dD][dD][ JDmMyY][mM][mM][mM][mM]' -Buffer = MιdS(DateStr, 5, 5) & "yy"~Posιtιon = Position + 4-Case DateStr Like "*[mM][mM][idDmMyY][dD][dD][dD][dD]"~Buffer = Mιd$(DateStr, 5, 5) & "yy"~Posιtιon = Position + 4-Case DateStr Like "*[dD][dD][dD]['dDmMyY][mM][mM][mM]"~Buffer = Mιd$(DateStr, 6, 5) & "yy"~Posιtιon = Position + 4-Case DateStr Like "*[mM][mM][mM][idDmMyY][dD][dD][dD]"~Buffer = Mιd$(DateStr, 6, 5) & "yy"-Posιtιon = Position + 4-Case DateStr Like "*[dD][dD][dD][dD]['dDmMyY][mM][mM]"-Buffer = MιdS(DateStr, 7) & "yy"~Posιtιon = Position + 4-Case DateStr Like "*[mM][mM][mM][mM][idDmMyY][dD][dD]"~Buffer = Mιd$(DateStr, 7) & "yy"~Posιtιon = Position + 4-Case DateStr Like "*[dD][dD][mM][mM][mM][mM][idDmMyY]"~Buffer = Mιd$(DateStr, 5, 2) & Mιd$(DateStr, 9) & "yy"~Posιtιon = Position + 4-Case DateStr Like "*[mM][mM][dD][dD][dD][dD][idDmMyY]"~Buffer = Mιd$(DateStr, 5, 2) & MιdS(DateStr, 9) & "yy"~Posιtιon = Position + 4-Case DateStr Like "*[dD][dD][dD][dD][mM][mM][mM]"~Buffer = Mιd$(DateStr, 6, 5) & "yy"~Posιtιon = Position + 4-Case DateStr Like "*[mM][mM][mM][mM][dD][dD][dD]"~Buffer = Mιd$(DateStr, 6, 5) & "yy"~Posιtιon = Position + 4-Case DateStr Like "*[dD][dD][idDmMyY][mM][mM][idDmMyY]"~Buffer = Mιd$(DateStr, 7 - Rp, 2) & MιdS(DateStr, 10 - Rp) & "yy"~Posιtιon = Position + 5-Case DateStr Like "*[mM][mM][idDmMyY][dD][dD]['dDmMyY]"~Buffer = Mιd$(DateStr, 7 - Rp, 2) & Mιd$(DateStr, 10 - Rp) & "yy"~Posιtιon = Position + 5-Case DateStr Like "* [dD][idDmMyY][mM][mM][idDmMyY]"~Buffer = MιdS(DateStr, 7 - Rp, 2) & Mιd$(DateStr, 10 - Rp) & "yy"~Posιtιon = Position + 5-Case DateStr Like "* [rrιM][idDmMyY][dD][dD][idDmMyY]"~Buffer = Mιd$(DateStr, 7 - Rp, 2) & Mιd$(DateStr, 10 - Rp) & "yy"~Posιtιon = Position + 5-Case DateStr Like "* [dD][dD][idDmMyY][mM][idDmMyY]"~Buffer = Mιd$(DateStr, 8 - Rp) & "yy"~Posιtιon = Position + 5-Case DateStr Like "* [mM][mM][idDmMyY][dD][idDmMyY]"~Buffer = Mιd$(DateStr, 8 - Rp) & "yy"~Posιtιon = Position + 5-Case DateStr Like "* [mM][mM][mM][idDmMyY]"~Buffer = Mιd$(DateStr, 9 - Rp) & "yy"~Posιtιon = Position + 6~Case DateStr Like "* [dD][dD][dD][idDmMyY]"~Buffer = Mιd$(DateStr, 9 - Rp) & "yy"~Posιtιon = Position + 6~Case DateStr Like "* [mM][mM][mM][mM]"~Buffer = "mmmyy"~Posιtιon = Position + 6~Case DateStr Like "* [dD][dD][dD][dD]"~Buffer = "dddyy"~Posιtιon = Position + 6~Case DateStr Like "* [dD][mM][mM][mM]"~Buffer = "dmmyy"-Posιtιon = Position + 6~Case DateStr Like "* [mM][dD][dD][dD]"~Buffer = "mddyy' -Position = Position + 6~Case DateStr Like "*
[dD][dD][dD][mM]"~Buffer = "ddmyy"~Posιtιon = Position + 6~Case DateStr Like "* [mM][mM][mM][dD]"~Buffer = "mmdyy' -Position = Position + 6~Case DateStr Like "*[dD]pdDmMyY][mM][mM][mM][idDmMyY]"~Buffer = Mιd$(DateStr 6 - Rp, 2) & Mιd$(DateStr, 10 - Rp) & "yy"~Posιtιon = Position + 5-Case DateStr Like "*[mM][idDmMyY][dD][dD][dD][idDmMyY]"~Buffer = MιdS(DateStr, 6 - Rp, 2) & Mιd$(DateStr, 10 - Rp) & "yy"~Posιtιon = Position + 5-Case DateStr Like "*[dD][dD][dD][idDmMyY][mM][idDmMyY]"~Buffer = Mιd$(DateStr 8 - Rp) &
"yy"~Posιtιon = Position + 5-Case DateStr Like "*[mM][mM][mM][idDmMyY][dD][idDmMyY]"~Buffer = Mιd$(DateStr, 8 - Rp) & "yy"~Posιtιon = Position + 5-Case DateStr Like "*[dD][idDmMyY][mM][mM][mM][mM]"~Buffer = Mιd$(DateStr, 6 - Rp, 4) & "yy"~Posιtιon = Position + 5-Case DateStr Like "*[mM][idDmMyY][dD][dD][dD][dD]"~Buffer = Mιd$(DateStr, 6 - Rp, 4) & "yy"~Posιtιon = Position + 5-Case DateStr Like "*[dD][dD][idDmMyY][mM][mM][mM]"~Buffer = Mιd$(DateStr, 7 - Rp, 4) & "yy"~Posιtιon = Position + 5-Case DateStr Like "*[mM][mM][idDmMyY][dD][dD][dD]"~Buffer = Mιd$(DateStr, 7 - Rp, 4) & "yy"~Posιtιon = Position + 5~Case DateStr Like "*[dD][dD][dD]pdDmMyY][mM][mM]"~Buffer = MιdS(DateStr, 7 - Rp, 4) & "yy"~Posιtιon = Position + 5-Case DateStr Like "*[mM][mM][mM][idDmMyY][dD][dD]"~Buffer = MιdS(DateStr, 7 - Rp, 4) & "yy"~Posιtιon = Position + 5~Case DateStr Like "*[dD][dD][dD][dD][idDmMyY][mM]"~Buffer = "d" & Mιd$(DateStr, 9 - Rp) & "yy"~Posιtιon = Position + 5-Case DateStr Like "*[mM][mM][mM][mM][idDmMyY][dD]"~Buffer = "m" & Mιd$(DateStr, 9 - Rp) & "yy"~Posιtιon = Position + 5-Case DateStr Like "*[dD][dD][dD][mM][mM][mM]"~Buffer = Mιd$(DateStr, 7 - Rp, 4) & "yy"~Posιtιon = Position + 5-Case DateStr Like "*[mM][mM][mM][dD][dD][dD]"~Buffer = Mιd$(DateStr, 7 - Rp, 4) & "yy"~Posιtιon = Position + 5-Case DateStr Like "*[dD][dD][dD][dD][mM][mM]' -Buffer = Mιd$(DateStr, 8 - Rp) & "yy"~Posιtιon = Position + 5-Case DateStr Like "*[mM][mM][mM][mM][dD][dD]"~Buffer = Mιd$(DateStr, 8 - Rp) & "yy"~Posιtιon = Position + 5-Case DateStr Like "*[dD][dD][idDmMyY][mM][mM]"~Buffer = Mιd$(DateStr, 8 - Rp, 3) & "yy"~Posιtιon = Position + 6~Case DateStr Like "*[mM][mM][idDmMyY][dD][dD]"~Buffer = Mιd$(DateStr, 8 - Rp, 3) & "yy"~Posιtιon = Position + 6-Case DateStr Like "* [dD][mM][mM][idDmMyY]"~Buffer = "d" & Mιd$(DateStr, 10 - Rp) & "yy"~Posιtιon = Position + 6-Case DateStr Like "* [mM][dD][dD]['dDmMyY]"~Buffer = "m" & Mιd$(DateStr, 10 - Rp) & "yy"~Posιtιon = Position + 6-Case DateStr Like "* [dD][idDmMyY][mM][idDmMyY]"~Buffer = Mιd$(DateStr, 8 - Rp, 3) & "yy"~Posιtιon = Position + 6-Case DateStr Like "* [mM]['dDmMyY][dD][idDmMyY]"~Buffer = Mιd$(DateStr, 8 - Rp, 3) & "yy"~Posιtιon = Position + 6-Case DateStr Like "* [dD][dD][mM][idDmMyY]"~Buffer = Mιd$(DateStr, 9 - Rp) & "yy"~Posιtιon = Position + 6-Case DateStr Like "* [mM][mM][dD][idDmMyY]"~Buffer = Mιd$(DateStr, 9 - Rp) & "yy"~Posιtιon = Position + 6-Case DateStr Like "* [dD][idDmMyY][mM][mM]"~Buffer = MιdS(DateStr, 8 - Rp, 2) & "myy"~Posιtιon = Position + 6-Case DateStr Like "* [mM][idDmMyY][dD][dD]"~Buffer = MιdS(DateStr, 8 - Rp, 2) & "dyy"~Posιtιon = Position + 6-Case DateStr Like "* [dD][dD][idDmMyY][mM]"~Buffer = Mιd$(DateStr, 9 - Rp) & "yy"~Posιtιon = Position + 6~Case DateStr Like "* [mM][mM][idDmMyY][dD]"~Buffer =
Mιd$(DateStr, 9 - Rp) & "yy"~Posιtιon = Position + 6-Case DateStr Like "* [mM][mM][mM]"~Buffer = Mιd$(DateStr, 10 - Rp) & "yy"~Posιtιon = Position + 7~Case DateStr Like "* [dD][dD][dD]"~Buffer = Mιd$(DateStr, 10 - Rp) & "yy"~Posιtιon = Position + 7~Case DateStr Like "*[mM][mM][mM][mM][idDmMyY]"~Buffer = Mιd$(DateStr, 9 - Rp) & "yy"~Posιtιon = Position + 6-Case DateStr Like "*[dD][dD][dD][dD][idDmMyY]"~Buffer = Mιd$(DateStr, 9 - Rp) & "yy"~Posιtιon = Position + 6-Case DateStr Like "*[dD]r dDmMyY][mM][mM][mM]"~Buffer = Mιd$(DateStr, 7 - Rp, 3) & "yy"~Posιtιon = Position + 6-Case DateStr Like "*[mM][idDmMyY][dD][dD][dD]"~Buffer = Mιd$(DateStr, 7 - Rp, 3) & "yy"~Posιtιon = Position + 6-Case DateStr Like "*[dD][dD][mM][mM][mM]"~Buffer = "dmmyy"~Posιtιon = Position + 6-Case DateStr Like "*[mM][mM][dD][dD][dD]"~Buffer = "mddyy"~Posιtιon = Position + 6-Case DateStr Like "*[dD][dD][dD][mM][mM]"~Buffer = "ddmyy"~Posιtιon = Position + 6-Case DateStr Like "*[mM][mM][mM][dD][dD]"~Buffer = "mmdyy' -Position = Position + 6-Case DateStr Like "*[dD][dD][dD][dD][mM]"~Buffer = "ddmyy"-Posιtιon = Position + 6-Case DateStr Like
"*[mM][mM][mM][mM][dD]"~Buffer = ' mmdyy' -Position = Position + 6-Case DateStr Like "* [mM][mM][idDmMyY]"~Buffer = Mιd$(DateStr 10 - Rp) & "yy"~Posιtιon = Position + 7~Case DateStr Like "* [dD][dD][idDmMyY]"~Buffer = MιdS(DateStr 10 - Rp) & "yy1 -Position = Position + 7~Case DateStr Like "* [dD][mM][mM]"~Buffer = 'dmyy"~Posιtιon =
Position + 7~Case DateStr Like "* [mM][dD][dD]"~Buffer = "mdyy"~Posιtιon = Position + 7~Case DateStr Like "* [dD][idDmMyY][mM]"~Buffer = "dmyy"~Posιtιon = Position + 7~Case DateStr Like "* [mM][idDmMyY][dD]' -Buffer = "mdyy' -Position = Position + 7~Case DateStr Like "* [dD][dD][mM]"-Buffer = ' dmyy"-Posιtιoπ = Position + 7~Case DateStr Like "* [mM][mM][dD]"~Buffer = "mdyy"~Posιtιon = Position + 7~Case DateStr Like "*[dD][idDmMyY][mM][rrιM][idDmMyY]"~Buffer = Mιd$(DateStr, 7 - Rp, 3) & "yy"~Posιtιon = Position + 6-Case DateStr Like "*[mM][idDmMyY][dD][dD][idDmMyY]"~Buffer = Mιd$(DateStr, 7 - Rp 3) & "yy"~Posιtιon = Position + 6-Case DateStr Like "*[dD][dD][mM][mM][idDmMyY]"~Buffer = "d" & Mιd$(DateStr, 10 - Rp) & "yy"~Posιtιon = Position + 6-Case DateStr Like "*[mM][mM][dD][dD][idDmMyY]"~Buffer = "m" & MιdS(DateStr, 10 - Rp) & "yy"~Posιtιon = Position + 6-Case DateStr Like "*[dD][dD][>dDmMyY][mM][idDmMyY]"-Buffer = Mιd$(DateStr 8 - Rp 3) & "yy"~Posιtιon = Position + 6-Case DateStr Like "*[mM][mMJ[idDmMyY][dD][idDmMyY]"~Buffer = Mιd$(DateStr, 8 - Rp, 3) & "yy"~Posιtιon = Position + 6-Case DateStr Like "*[mM][mM][mM]['dDmMyY]"~Buffer = Mιd$(DateStr, 10 - Rp) & "yy"~Posιtιon = Position + 7~Case DateStr Like "*[dD][dD][dD][idDmMyY]"~Buffer = Mιd$(DateStr, 10 - Rp) & "yy"~Posιtιon = Position + 7~Case DateStr Like "*[dD][mM][mM][mM]"~Buffer = "dmyy"~Posιtιon = Position + 7~Case DateStr Like "*[mM][dD][dD][dD]"~Buffer = "mdyy"~Posιtιon = Position + 7~Case DateStr Like "*[dD][dD][dD][mM]"-Buffer = "dmyy"~Posιtιon = Position + 7~Case DateStr Like "*[mM][mM][mM][dD]"~Buffer = "mdyy"~Posιtιon = Position + 7-Case DateStr Like "* [mM][idDmMyY]"~Buffer = "myy"~Posιtιon = Position + 8~Case DateStr Like "* [dD][idDmMyY]"~Buffer = "dyy"~Posιtιon = Position + 8~Case DateStr Like "* [mM][mM]"~Buffer = "myy"~Posιtιon = Position + 8~Case DateStr Like "* [dD][dD]"~Buffer = "dyy"~Posιtιon = Position + 8~Case DateStr Like "*[dD][mM][mM][idDmMyY]"~Buffer = "dmyy"~Posιtιon = Position + 7~Case DateStr Like "*[mM][dD][dD][idDmMyY]"~Buffer = "mdyy"-Posιtιon = Position + 7~Case DateStr Like "*[dD][idDmMyY][mM][idDmMyY]"~Buffer = "dmyy"~Posιtιon = Position + 7~Case DateStr Like "*[mM][idDmMyY][dD][idDmMyY]"~Buffer = "mdyy"~Posιtιon = Position + 7~Case DateStr Like "*[dD][dD][mM][idDmMyY]"~Buffer = "dmyy"~Posιtιon = Position + 7~Case DateStr Like "*[mM][mM][dD][idDmMyY]"~Buffer = "mdyy"~Posιtιon = Position + 7~Case DateStr Like "*[dD][idDmMyY][mM][mM]"~Buffer = "dmyy"~Posιtιon = Position + 7~Case DateStr Like "*[mM]['dDmMyY][dD][dD]"~Buffer = "mdyy"~Posιtιon = Position + 7~Case DateStr Like "*[dD][dD][mM][mM]"~Buffer = "dmyy"~Posιtιon = Position + 7~Case DateStr Like "*[mM][mM][dD][dD]"~Buffer = "mdyy"~Posιtιon = Position + 7~Case DateStr Like "*[dD][dD][idDmMyY][mM]"~Buffer = "dmyy"~Posιtιon = Position + 7~Case DateStr Like "*[mM][mM]['dDmMyY][dD]"~Buffer = "mdyy"~Posιtιon = Position + 7~Case DateStr Like "*[mM][mM][idDmMyY]"~Buffer = "myy"~Posιtιon = Position + 8~Case DateStr Like "*[dD][dD][idDmMyY]"~Buffer = "dyy"~Posιtιon = Position + 8~Case Else-Buffer = ""-End Select-End
Sub-'*"***"*"""****""""" ""*""**"""*"— "*"**"*"""*"~'***Replace_Rιght1 is the single module used for short date~'"*formats where yy appears on the left hand side Two characters are~'*"removed (usually non date characters) and an additional two yy's are~'***ιnserted, to create a long date format This module is a variance on-'*" the replace criteria used for the substitution of date formats on~'***the right of a yy This method covers the same combinations - -Public Sub Replace_Rιght1 (DateStr As
String, Pos_Rιght As Long)~Posιtιon = 0 'Set position to 0~Buffer = Clear Buffer-Position = Pos_Rιght 'Set yy to the left of the date string-Select Case True-Case DateStr Like
"[idDmMyY]['dDmMyY][idDmMyY][mM][mM][mM][mM][idDmMyY]['dDmMyY][idDmMyY][dD]" 'Identify a date in the format yy— mmmm— d-Buffer = "yy" & LeftS(DateStr, 2) & Mιd$(DateStr, 4, 6) & "d" 'Replace with yyyy--mmmm-d~Case DateStr Like "[idDmMyY][idDmMyY][idDmMyY][mM][mM][mM][mM][idDmMyY][idDmMyY][dD][dD]"~Buffer = "yy" &
Left$(DateStr, 2) & MιdS(DateStr, 4, 6) & "d"~Case DateStr Like
"[idDmMyYJIidDmMyYJfidDmMyYKmMHmMKmMJImM idDmMyYlt'dDmMyYJtdDHidDmMyY -Buffer = "yy" &
Left$(DateStr, 2) & MιdS(DateStr, 4, 7)~Case DateStr Like
"[idDmMyY][idDmMyY][idDmMyY][mM][mM][mM][mM][idDmMyY][dD][dD]*' -Buffer = "yv" & Left$(DateStr 2) & Mιd$(DateStr, 4, 6)~Case DateStr Like
"[idDmMyY][idDmMyY][idDmMyY][mM][mM][mM][mM][idDmMyY][dD][idDmMyY]*"~Buffer = "yy" & LeftS(DateStr 2) &
Mιd$(DateStr, 4, 6)~Case DateStr Like "PdDmMyY][idDmMyY][idDmMyY][mM][mM][mM][mM][dD][dD]*"~Buffer = ' yy" &
Left$(DateStr, 2) & Mιd$(DateStr, 4, 5)~Case DateStr Like
"[idDmMyY][idDmMyY][idDmMyY][mM][mM][mM][mM][dD][!dDmMyY]*"~Buffer = "yy" & Left$(DateStr, 2) & Mιd$(DateStr, 4, 5)~Case DateStr Like
"[idDmMyY][idDmMyY][idDmMyY][mM][mM][mM][mM][idDmMyY][idDmMyY][idDmMyY][idDmMyY]"~Buffer = "yy" &
Left$(DateStr, 2) & Mιd$(DateStr, 4, 7)~Case DateStr Like
"[idDmMyY][ldDmMyY][mM][mM][mM][mM][idDmMyY][idDmMyY][ldDmMyY][dD]*"~Buffer = "yy" & LeftS(DateStr, 1 ) &
Mιd$(DateStr, 3, 6) & "d"~Case DateStr Like "[>dDmMyY][idDmMyY][mM][mM][mM][mM][idDmMy Y]['dDmMy Y][dD][dD]*"~Buffer = "yy" & LeftS(DateStr, 1 ) &
Mιd$(DateStr, 3, 6) & "d"~Case DateStr Like
"[idDmMyY]['dDmMyY][mM][mM][mM][mM][idDmMyY][idDmMyY][dD][idDmMyY]*"~Buffer = "yy" & LeftS(DateStr, 1 ) &
Mιd$(DateStr, 3, 7)~Case DateStr Like "[idDmMyY][idDmMyY][mM][mM][mM][mM][idDmMyY][dD][dD]*"~Buffer = "yy" &
Left$(DateStr, 1 ) & Mιd$(DateStr, 3, 6)~Case DateStr Like "[idDmMyY][idDmMyY][mMHmM][mM][mM][idDmMyY][dD][idDmMyY]*"~Buffer = 'yy" & Left$(DateStr, 1 ) &
Mιd$(DateStr, 3, 6)~Case DateStr Like "[idDmMyY][idDmMyY][mM][mM][mM][mM][dD][dD]*"~Buffer = "yy" &
Left$(DateStr, 1 ) & Mιd$(DateStr, 3, 5)-Case DateStr Like
"[idDmMyY][idDmMyY][mM][mM][mM][mM][dD][idDmMyY]*"~Buffer = "yy" & LeftS(DateStr, 1 ) & Mιd$(DateStr, 3,
5)~Case DateStr Like "[idDmMyY][idDmMyY][mM][mM][mM][mM][idDmMyY][idDmMyY][idDmMyY][idDmMyY]*"~Buffer = "yy" & LeftS(DateStr, 1 ) & Mιd$(DateStr, 3, 7)~Case DateStr Like
"['dDmMyY][mM][mM][mM][mM][idDmMyY][idDmMyY][idDmMyY][dD]*"~Buffer = "yy" & Mιd$(DateStr, 2, 6) & "d"~Case
DateStr Like "[ldDmMyY][mM][mM][mM][mM][idDmMyY][idDmMyY][dD][dD]*''~Buffer = "yy" & Mιd$(DateStr, 2, 6) &
"d"~Case DateStr Like "[idDmMyY][mM][mM][mM][mM][idDmMyY][idDmMyY][dD]['dDmMyY]*"~Buffer = "yy" &
Mιd$(DateStr 2, 7)~Case DateStr Like dDmMyY][mM][mM][mM][mM][idDmMyY][dD][dD]*"~Buffer = "yy" & Mιd$(DateStr, 2, 6)~Case DateStr Like "[idDmMyY][mM][mM][mM][mM][idDmMyY][dD][idDmMyY]*"~Buffer = "yy" &
MιdS(DateStr 2, 6)~Case DateStr Like "[idDmMyY][mM][mM][mM][mM][dD][dD]*"~Buffer = "yy" & MιdS(DateStr, 2,
5)~Case DateStr Like ' PdDmMyY][mM][mM][mM][mM][dD][idDmMyY]*"~Buffer = "yy" & MιdS(DateStr, 2, 5)~Case '
DateStr Like "[ldDmMyY][mM][mM][mM][mM][idDmMyY][idDmMyY][ldDmMyY][idDmMyY]*"~Buffer = 'yy' &
Mιd$(DateStr, 2 7)~Case DateStr Like "[m ][mM][mM][mM][idDmMyY][ldDmMyY][idDmMyY][dD]*"~Buffer = "yy" & Mιd$(DateStr, 1 , 4) & "dd"~Case DateStr Like "[mM][m ][mM][mM][idDmMyY][ldDmMyY][dD][dD]*' -Buffer = "yy" & MιdS(DateStr, 1 , 4) & "dd"~Case DateStr Like "[mM][mM][mM][mM][>dDmMyY][idDmMyY][dD][idDmMyY]*"~Buffer = "yy" & MιdS(DateStr, 1 , 4) & "dd"~Case DateStr Like "[mM][mM][mM][mM][ldDmMyY][dD][dD]*"~Buffer = "yy" & MιdS(DateStr, 1 4) & "d"~Case DateStr Like "[mM][mM][mM][mM][idDmMyY][dD][idDmMyY]*"-Buffer = "yy" & Mιd$(DateStr, 1 , 4) & "d"~Case DateStr Like "[mM][mM][mM][mM][dD][dD]*"~Buffer = "yy" & Mιd$(DateStr, 1 , 3) & "d"~Case DateStr Like "[mM][mM][mM][mM][dD][idDmMyY]*"~Buffer = "yy" & Mιd$(DateStr, 1 , 3) & "d"~Case DateStr Like "[mM][mM][mM][mM][idDmMyY][idDmMyY][idDmMyY][idDmMyY]*"~Buffer = "yy" & MιdS(DateStr, 1 6)~Case DateStr Like "[idDmMyY][idDmMyY][idDmMyY][mM][mM][mM]['dDmMyY][idDmMyY][idDmMyY][dD]*"~Buffer = "yy" & Left$(DateStr, 2) & Mιd$(DateStr, 4, 5) & "d"~Case DateStr Like
"[idDmMyY][idDmMyY][idDmMyY][mM][mM][mM][idDmMyY][idDmMyY][dD][dD]*"~Buffer = "yy" & LeftS(DateStr, 2) & Mιd$(DateStr, 4, 5) & "d"~Case DateStr Like
"[idDmMyY][idDmMyY][idDmMyY][mM][mM][mM][idDmMyY][idDmMyY][dD][idDmMyY]*"~Buffer = "yy" & Left$(DateStr, 2) & Mιd$(DateStr, 4, 6)~Case DateStr Like "[idDmMyY][idDmMyY][idDmMyY][mM][mM][mM][idDmMyY][dD][dD]*"-Buffer = "yy" & Left$(DateStr, 2) & Mιd$(DateStr, 4, 5)~Case DateStr Like "[idDmMyY][idDmMyY][idDmMyY][mM][mM][mM][idDmMyY][dD][idDmMyY]*"~Buffer = "yy" & Left$(DateStr, 2) & Mιd$(DateStr, 4, 5)~Case DateStr Like
"['dDmMyY][idDmMyY][idDmMyY][mM][mM][mM][dD][dD]*"~Buffer = "yy" & Left$(DateStr, 2) & Mιd$(DateStr, 4 4)~Case DateStr Like "[idDmMyY][idDmMyY][idDmMyY][mM][mM][mM][dD][idDmMyY]*"~Buffer = "yy" & LeftS(DateStr, 2) & Mιd$(DateStr, 4, 4)~Case DateStr Like
"[idDmMyY][idDmMyY][idDmMyY][mM][mM][mM][idDmMyY][idDmMyY][idDmMyY][ldDmMyY]*"~Buffer = "yy" & Left$(DateStr, 2) & Mιd$(DateStr, 4, 6)~Case DateStr Like
"[idDmMyY][!dDmMyY][mM][mM][mM][idDmMyY][idDmMyY][idDmMyY][dD]*"~Buffer = "yy" & Left$(DateStr, 1) & Mιd$(DateStr, 3, 5) & "d"~Case DateStr Like "[idDmMyY][idDmMyY][mM][mM][mM][idDmMyY][idDmMyY][dD][dD]*"~Buffer = "yy" & Left$(DateStr, 1 ) & MιdS(DateStr
3, 5) & "d"~Case DateStr Like "[idDmMyY][idDmMyY][mM][mM][mM][idDmMyY][ldDmMyY][dD][ldDmMyY]*"~Buffer = "yy" & Left$(DateStr, 1 ) & Mιd$(DateStr, 3, 6)~Case DateStr Like
"[idDmMyY][idDmMyY][mM][mM][mM][idDmMyY][dD][dD]*"-Buffer = "yy" & Left$(DateStr 1 ) & MιdS(DateStr, 3, 5)~Case DateStr Like "[idDmMyY][idDmMyY][mM][mM][mM][idDmMyY][dD][idDmMyY]*"~Buffer = "yy" & Left$(DateStr, 1 ) & Mιd$(DateStr, 3, 5)~Case DateStr Like "[ldDmMyY][idDmMyY][mM][mM][mM][dD][dD]*"~Buffer = "yy" & Left$(DateStr, 1 ) & Mιd$(DateStr, 3, 4)~Case DateStr Like "[idDmMyY][idDmMyY][mM][mM][mM][dD][ldDmMyY]*"~Buffer = "yy" & Left$(DateStr, 1) & Mιd$(DateStr, 3, 4)~Case DateStr Like
"[idDmMyY][idDmMyY][mM][mM][mM]['dDmMyY][idDmMyY][idDmMyY][idDmMyY]*' -Buffer = "yy" & Left$(DateStr, 1 ) & Mιd$(DateStr, 3, 6)~Case DateStr Like dDmMyY][mM][mM][mM][!dDmMyY]['dDmMyY][idDmMyY][dD]*"~Buffer = "yy" & Mιd$(DateStr, 2, 5) & "d"~Case DateStr Like dDmMyY][mM][mM][mM][idDmMyY][idDmMyY][dD][dD]*"~Buffer = "yy" & Mιd$(DateStr, 2, 5) & "d"~Case DateStr Like dDmMyY][mM][mM][mM][idDmMyY]PdDmMyY][dD][idDmMyY]*"~Buffer = "yy" & Mιd$(DateStr, 2, 6)~Case DateStr Like "[idDmMyY][mM][mM][mM][idDmMyY][dD][dD]*"~Buffer = "yy" & Mιd$(DateStr 2, 5)~Case DateStr Like "[|dDmMyY][mM][mM][mM][idDmMyY][dD][idDmMyY]*"~Buffer = "yy" & Mιd$(DateStr, 2, 5)~Case DateStr Like "[ldDmMyY][mM][mM][mM][dD][dD]*"~Buffer = "yy" & MιdS(DateStr 2, 5)~Casε DateStr Like "[idDmMyY][mM][mM][mM][dD][idDmMyY]*"~Buffer = "yy" & Mιd$(DateStr 2, 4)~Case DateStr Like
"[idDmMyY][mM][mM][mM][idDmMyY][ldDmMyY][idDmMyY][idDmMyY]*"~Buffer = "yy" & Mιd$(DateStr, 2, 6)~Case DateStr Like "[mM][mM][mM][idDmMyY][idDmMyY][idDmMyY][dD]*"~Buffer = "yy" & MιdS(DateStr, 1 , 3) & "dd"~Case DateStr Like "[mM][mM][mM][idDmMyY][idDmMyY][dD][dD]*"~Buffer = "yy" & Mιd$(DateStr, 1 , 3) & "dd"-Case DateStr Like "[mM][mM][mM][idDmMyY][idDmMyY][dD][idDmMyY]*"~Buffer = ' yy ' & MιdS(DateStr, 1 3) & "dd"~Case DateStr Like "[mM][mM][mM]['dDmMyY][dD][dD]*"~Buffer = "yy" & MιdS(DateStr 1 , 3) & "d' ~Case DateStr Like "[mM][mM][mM][idDmMyY][dD][idDmMyY]*"~Buffer = "yy" & MιdS(DateStr 1 3) & "d' -Case DateStr Like "[mM][mM][mM][dD][dD]*"~Buffer = "yy" & Mιd$(DateStr, 1 , 2) & "d"~Case DateStr Like "[mM][mM][mM][dD][ldDmMyY]*"~Buffer = "yy" & Mιd$(DateStr, 1 , 2) & "d"~Case DateStr Like "[mM][mM][mM][idDmMyY][idDmMyY][idDmMyY][idDmMyY]*"~Buffer = "yy" & MιdS(DateStr, 1 , 5)~Case DateStr Like "[idDmMyY][idDmMyY]['dDmMyY][mM][mM][idDmMyY][idDmMyY][idDmMyY][dD]*' -Buffer = "yy" & Left$(DateStr, 2) & Mιd$(DateStr, 4, 4) & "d"~Case DateStr Like
"[idDmMyY][idDmMyY][idDmMyY][mM][mM][idDmMyY][idDmMyY][dD][dD]*"~Buffer = "yy" & LeftS(DateStr, 2) & Mιd$(DateStr, 4, 4) & "d"~Case DateStr Like "[idDmMyY][idDmMyY][idDmMyY][mM][mM][idDmMyY][idDmMyY][dD][idDmMyY]*"~Buffer = "yy" & LeftS(DateStr, 2) & Mιd$(DateStr, 4, 5)~Case DateStr Like dDmMyY][idDmMyY][idDmMyY][mM][mM][idDmMyY][dD][dD]*''~Buffer =' "yy" & Left$(DateStr, 2) & Mιd$(DateStr, 4, 4)~Case DateStr Like
"[idDmMyY][idDmMyY][>dDmMyY][mM][mM][!dDmMyY][dD][idDmMyY]*"~Buffer = "yy" & LeftS(DateStr, 2) & Mιd$(DateStr, 4, 4)~Case DateStr Like "[ldDmMyY][idDmMyY][idDmMyY][mM][mM][dD][dD]*"~Buffer = "yy" & LeftS(DateStr, 2) & Mιd$(DateStr, 4, 3)~Case DateStr Like "[idDmMyY][idDmMyY][idDmMyY][mM][mM][dD][idDmMyY]*"~Buffer = "yy" & LeftS(DateStr, 2) & Mιd$(DateStr, 4,
3)~Case DateStr Like "[idDm yYJfidDmMyYlIidDm yYitmMJtmMJIidDmMyYltidDmMyYltidDm yYlI'dDm yYi Buffer = "yy" & Left$(DateStr, 2) & Mιd$(DateStr, 4, 5)~Case DateStr Like
"[idDmMyY][idDmMyY][mM][mM][idDmMyY][idDmMyY][idDmMyY][dD]*"~Buffer = "yy" & LeftS(DateStr, 1 ) & Mιd$(DateStr, 3, 4) & "d"~Case DateStr Like "[idDmMyY][idDmMyY][mM][mM][idDmMyY][idDmMyY][dD][dD]*' -Buffer = "yy" & Left$(DateStr, 1 ) & MιdS(DateStr, 3, 4) & "d"~Case DateStr Like
"[idDmMyY][idDmMyY][mM][mM][idDmMyY][idDmMyY][dD][idDmMyY]*"~Buffer = "yy" & LeftS(DateStr, 1 ) & MιdS(DateStr, 3, 5)~Case DateStr Like "[ldDmMyY][idDmMyY][mM][mM][idDmMyY][dD][dD]*"~Buffer = "yy" & LeftS(DateStr, 1) & Mιd$(DateStr, 3, 4)~Case DateStr Like "[idDmMyY][idDmMyY][mM][mM][idDmMyY][dD][idDmMyY]*"~Buffer = "yy" & Left$(DateStr, 1 ) & MιdS(DateStr, 3, 4)~Case DateStr Like "[idDmMyY][idDmMyY][mM][mM][dD][dD]*"~Buffer = "yy" & Left$(DateStr, 1 ) & MιdS(DateStr 3, 3)~Case DateStr Like "[idDmMyYi[idDmMyY][mM][mM][dD][idDmMyY]*"~Buffer = "yy" & LeftS(DateStr, 1 ) & MιdS(DateStr, 3, 3)~Case DateStr Like "[ldDmMyY][ldDmMyY][mM][mM][ldDmMyY][ldDmMyY][idDmMyY][idDmMyY]*"~Buffer = ' yy" & LeftStDateStr 1 ) &
Mιd$(DateStr, 3, 5)~Case DateStr Like "[idDnrιMyY][mM][mM][idDmMyY][idDmMyY][idDmMyY][dD]*"~Buffer = "yy" & MιdS(DateStr, 2, 4) & "d"~Case DateStr Like "[idDmMyY][mM][mM][idDmMyY][idDmMyY][dD][dD]*"~Buffer = "yy" & Mιd$(DateStr, 2, 4) & "d"~Case DateStr Like "[idDmMyY][mM][mM][idDmMyY][idDmMyY][dD][idDmMyY]*"~Buffer = "yy' & MιdS(DateStr, 2, 5)~Case DateStr Like "PdDmMyY][mM][mM][idDmMyY][dD][dD]*"~Buffer = "yy" & Mιd$(DateStr, 2, 4)~Case DateStr Like "[idDmMyY][mM][mM][idDmMyY][dD][idDmMyY]*"~Buffer = "yy" & Mιd$(DateStr, 2 4)~Case DateStr Like "[idDmMyY][mM][mM][dD][dD]*"~Buffer = "yy" & Mιd$(DateStr, 2, 4)~Case DateStr Like "[idDmMyY][mM][mM][dD][idDmMyY]*"~Buffer = "yy" & Mιd$(DateStr, 2, 3)-Case DateStr Like
"[ldDmMyY][mM][mM][ldDmMyY][idDmMyY][idDmMyY][ldDmMyY]*"~Buffer = "yy" & MιdS(DateStr, 2, 5)~Case DateStr Like "[mM][mM][>dDrnMyY][idDmMyY][idDmMyY][dD]*"~Buffer = "yy" & MιdS(DateStr, 1 , 2) & "dd"~Case DateStr Like "[mM)[mM][idDmMyY][ldDmMyY][dD][dD]*"~Buffer = "yy" & MιdS(DateStr, 1 , 2) & "dd"~Case DateStr Like
"[mM][mM][idDmMyY][idDmMyY][dD][idDmMyY]*"~Buffer = "yy" & Mιd$(DateStr, 1 , 2) & "dd"~Case DateStr Like "[mM][mM][idDmMyY][dD][dD]*"~Buffer = "yy" & Mιd$(DateStr, 1 , 2) & "d"~Case DateStr Like "[mM][mM]r dDmMyY][dD][idDmMyY]*"~Buffer = "yy" & Mιd$(DateStr, 1 , 2) & "d"~Case DateStr Like "[mM][mM][dD][dD]*"~Buffer = "yy" & Mιd$(DateStr, 1 , 1) & "d"~Case DateStr Like "[mM][mM][dD][idDmMyY]*"~Buffer = "yy" & Mιd$(DateStr, 1 , 1 ) & "d"~Case DateStr Like "[mM][mM]pdDmMy Y][idDmMy Y][idDmMyY][idDmMyY]*"~Buffer = "yy" & Mιd$(DateStr, 1 , 4)-Case DateStr Like
"['dDmMyY][idDmMyY][idDmMyY][mM][idDmMyY][idDmMyY][idDmMyY][dD]*"~Buffer = "yy" & LeftS(DateStr, 2) & Mιd$(DateStr, 4, 3) & "d"~Case DateStr Like "[idDmMyY][idDmMyY]['dDmMyY][mM]['dDmMyY][idDmMyY][dD][dD]*"~Buffer = "yy" & Left$(DateStr, 2) & Mιd$(DateStr, 4, 3) & "d"~Case DateStr Like
"[idDmMyY][idDmMyY][idDmMyY][mM][idDmMyY][idDmMyY][dD]['dDmMyY]*"~Buffer = "yy" & Left$(DateStr, 2) & Mιd$(DateStr, 4, 4)~Case DateStr Like "[idDmMyY][idDmMyY][idDmMyY][mM][idDmMyY][dD][dD]*"~Buffer = "yy" & Left$(DateStr, 2) & Mιd$(DateStr, 4, 3)~Case DateStr Like "[idDmMyY][idDmMyY][idDmMyY][mM][idDmMyY][dD][idDmMyY]*"~Buffer = "yy" & LeftS(DateStr, 2) & Mιd$(DateStr 4, 3)~Case DateStr Like "[idDmMyY][idDmMyY][idDmMyY][mM][dD][dD]*"~Buffer = "yy" & Left$(DateStr, 2) &
Mιd$(DateStr, 4, 2)~Case DateStr Like "[ldDmMyY][idDmMyY][idDmMyY][mM][dD][idDmMyY]*"~Buffer = "yy" & LeftS(DateStr, 2) & Mιd$(DateStr, 4, 2)~Case DateStr Like
"[idDmMyY][idDmMyY][idDmMyY][mM][idDmMyY][idDmMyY][idDmMyY][idDmMyY]*"~Buffer = "yy" & Left$(DateStr, 2) & Mιd$(DateStr, 4, 4)~Case DateStr Like dDmMyY][idDmMyY][mM][idDmMyY][idDmMyY][idDmMyY][dD]*"~Buffer = "yy" & Left$(DateStr, 1 ) & MιdS(DateStr, 3, 3) & "d"~Case DateStr Like
"[idDmMyY][idDmMyY][mM]['dDmMyY]['dDmMyY][dD][dD]*"~Buffer = "yy" & Left$(DateStr, 1 ) & Mιd$(DateStr, 3, 3) & "d"~Case DateStr Like "[idDmMyY][idDmMyY][mM][idDmMyY][idDmMyY][dD][idDmMyY]*"~Buffer = "yy" & LeftS(DateStr,
1 ) & Mιd$(DateStr, 3, 4)~Case DateStr Like "[idDmMyY][idDmMyY][mM][idDmMyY][dD][dD]*"~Buffer = "yy" & Left$(DateStr, 1 ) & Mιd$(DateStr, 3, 3)~Case DateStr Like "[idDmMyY][idDmMyY][mM][idDmMyY][dD][idDmMyYr"~Buffer = "yy" & LeftS(DateStr 1 ) & Mιd$(DateStr, 3, 3)-Case
DateStr Like "[idDmMyY][idDmMyY][mM][dD][dD]*"~Buffer = "yy" & LeftS(DateStr, 1 ) & Mιd$(DateStr, 3, 2)~Case DateStr Like "[idDmMyY][idDmMyYHmM][dD][!dDmMyY]*"~Buffer = "yy" & Left$(DateStr, 1 ) & MιdS(DateStr, 3, 2)~Case DateStr Like "[idDmMyY][idDmMyY][mM][idDmMyY][idDmMyY][idDmMyY][idDmMyY]*"~Buffer = "yy" & Left$(DateStr, 1 ) & MιdS(DateStr, 3, 4)~Case DateStr Like "[idDmMyY][mM]['dDmMyY][idDmMyY][idDmMyY][dD]*"~Buffer = "yy" & MιdS(DateStr, 2, 3) & "d"~Case DateStr Like "[idDmMyY][mM][idDmMyY][idDmMyY][dD][dD]*"~Buffer = "yy" &
Mιd$(DateStr, 2, 3) & "d"~Case DateStr Like "[idDmMyY][mM][idDmMyY][idDmMyY][dD][idDmMyY]*"~Buffer = "yy" & MιdS(DateStr, 2, 4)~Case DateStr Like "[>dDmMyY][mM][idDmMyY][dD][dDJ*"~Buffer = "yy" & MιdS(DateStr, 2, 3)~Case DateStr Like "[idDmMyY][mM][idDmMyY][dD][idDmMyY]*"~Buffer = "yy" & MιdS(DateStr, 2 3)~Case DateStr Like "[ldDmMyY][mM][dD][dD]*"~Buffer = "yy" & MιdS(DateStr, 2, 3)~Case DateStr Like "['dDmMyY][mM][dD][idDmMyY]*"~Buffer = "yy" & Mιd$(DateStr, 2 2)~Case DateStr Like
"[idDmMyY][mM][idDmMyY][idDmMyY]['dDmMyY][idDmMyY]*"~Buffer = "yy" & MιdS(DateStr, 2 4)~Case DateStr Like "[mM][idDmMyY][idDmMyY][idDmMyY][dD]*"-Buffer = "yymdd"~Case DateStr Like "[mM][idDmMyY][idDmMyY][dD][dD]*"~Buffer = "yymdd"~Case DateStr Like "[mM][idDmMyY][idDmMyY][dD]r dDmMyY]*"~Buffer = "yymdd"~Case DateStr Like "[mM][idDmMyY][dD][dD]*"~Buffer = "yymd"~Case DateStr Like "[mM][idDmMyY][dD][idDmMyY]*"~Buffer = "yymd"~Case DateStr Like
"[mM][dD][dD]*"~Buffer = "yym"~Case DateStr Like "[mM][dD][idDmMyY]*"-Buffer = "yym"~Case DateStr Like "[mM][idDmMyY][idDmMyY][idDmMyY][idDmMyY]*"~Buffer = "yy" & Mιd$(DateStr, 1 , 3)~Case DateStr Like "[imMdDyY][imMdDyY]['mMdDyY][dD][dD][dD][dD][imMdDyY][imMdDyY][imMdDyY][mM]"~Buffer = "yy" & Left$(DateStr,
2) & Mιd$(DateStr, 4, 6) & "m"~Case DateStr Like "['mMdDyY][imMdDyY][imMdDyY][dD][dD][dD][dD][imMdDyY][imMdDyY][mM][mM]"~Buffer = "yy" & LeftS(DateStr, 2) &
Mιd$(DateStr, 4, 6) & "m"~Case DateStr Like
"[imMdDyY][imMdDyY][imMdDyY][dD][dD][dD][dD][imMdDyY][imMdDyY][mM][imMdDyY]"~Buffer = "yy" & LeftS(DateStr,
2) & Mιd$(DateStr, 4, 7)~Case DateStr Like
"[imMdDyY][imMdDyY][imMdDyY][dD][dD][dD][dD][imMdDyY][mM][mM]*"~Buffer = "yy" & LeftS(DateStr, 2) & Mιd$(DateStr, 4, 6)~Case DateStr Like
"[imMdDyY][imMdDyY][lmMdDyY][dD][dD][dD][dD][imMdDyY][mM][imMdDyY]*"~Buffer = "yy" & LeftS(DateStr, 2) &
Mιd$(DateStr, 4, 6)~Case DateStr Like "[lmMdDyY][imMdDyY][imMdDyY][dD][dD][dD][dD][mM][mM]*"~Buffer = "yy" &
LeftS(DateStr, 2) & MιdS(DateStr, 4, 5)~Case DateStr Like
"[imMdDyY][imMdDyY][imMdDyY][dD][dD][dD][dD][mM][imMdDyY]*"~Buffer = "yy" & LeftS(DateStr, 2) & MιdS(DateStr 4, 5)~Case DateStr Like
"[imMdDyY][imMdDyY]['mMdDyY][dD][dD][dD][dD][imMdDyY][imMdDyY][imMdDyY][imMdDyY]"~Buffer = "yy" &
LeftS(DateStr, 2) & MιdS(DateStr, 4, 7)~Case DateStr Like
"['mMdDyY]['mMdDyY][dD][dD][dD][dD][imMdDyY][imMdDyY][imMdDyY][mM]*"~Buffer = "yy" & LeftS(DateStr, 1 ) &
MιdS(DateStr, 3 6) & "m"~Case DateStr Like "[imMdDyY][imMdDyY][dD][dD][dD][dD]['mMdDyY][imMdDyY][mM][mM]*"~Buffer = "yy" & LeftS(DateStr, 1 ) &
Mιd$(DateStr, 3, 6) & "m"~Case DateStr Like
"[lmMdDyY][imMdDyY][dD][dD][dD][dD][lmMdDyY][imMdDyY][mM][imMdDyY]*"~Buffer = "yy" & LeftS(DateStr, 1 ) &
MιdS(DateStr 3, 7)~Case DateStr Like "[lmMdDyY]['mMdDyY][dD][dD][dD][dD][imMdDyY][mM][mM]*"~Buffer = "yy" &
LeftS(DateStr, 1 ) & MιdS(DateStr, 3, 6)~Case DateStr Like
"[imMdDyY][imMdDyY][dD][dD][dD][dD][imMdDyY][mM][imMdDyY]*"~Buffer = "yy" & Left$(DateStr, 1 ) & Mιd$(DateStr, 3 6)~Case DateStr Like mMdDyY]PmMdDyY][dD][dD][dD][dD][mM][mM]*"~Buffer = "yy" & LeftS(DateStr, 1 ) & MιdS(DateStr, 3 5)~Case DateStr Like "[lmMdDyY][lmMdDyY][dD][dD][dD][dD][mM][imMdDyY]*"~Buffer = "yy" & Left$(DateStr, 1 ) & Mιd$(DateStr, 3, 5)~Case DateStr Like
"[imMdDyY][imMdDyY][dD][dD][dD][dD][imMdDyY][imMdDyY][imMdDyY][imMdDyY]*"~Buffer = "yy" & LeftS(DateStr 1 ) & Mιd$(DateStr, 3, 7)~Case DateStr Like mMdDyYHdDHdD DHdDJtimMdDyYJ m DyYHim dDyYHm r'-Buffer = "yy" & MιdS(DateStr, 2, 6) & "m"~Case DateStr Like "[imMdDyY][dD][dD][dD][dD][imMdDyY][imMdDyY][mM][mM]*"~Buffer = "yy" & Mιd$(DateStr, 2, 6) & "m"~Case DateStr Like "[imMdDyY][dD][dD][dD][dD][imMdDyY][imMdDyY][mM][imMdDyY]*"~Buffer = "yy" & MιdS(DateStr, 2, 7)~Case
DateStr Like "[imMdDyY][dD][dD][dD][dD]['mMdDyY][mM][mM]*"~Buffer = "yy" & MιdS(DateStr 2, 6)~Case DateStr Like "['mMdDyY][dD][dD][dD][dD][imMdDyY][mM][imMdDyY]*"-Buffer = "yy" & Mιd$(DateStr, 2, 6)~Case DateStr Like "[imMdDyY][dD][dD][dD][dD][mM][mM]*"~Buffer = "yy" & MιdS(DateStr 2, 5)-Case DateStr Like "[imMdDyY][dD][dD][dD][dD]imM][imMdDyY]""~Buffer = "yy" &. Mιd$(DateStr, 2, 5)~Case DateStr Like "[imMdDyY][dD][dD][dD][dD][imMdDyY][!mMdDyY][imMdDyY][imMdDyY]*"~Buffer = "yy" & Mιd$(DateStr, 2, 7)~Case
DateStr Like "[dD][dD][dD][dD][lmMdDyY][lmMdDyY][imMdDyY][mM]*"~Buffer = "yy" & Mιd$(DateStr, 1 , 4) & "mm"~Case DateStr Like "[dD][dD][dD][dD][imMdDyY][imMdDyY][mM][mM]*"~Buffer = "yy" & MιdS(DateStr, 1 , 4) & "mm"~Case DateStr Like "[dDHdDHdDHdDH'mMdDyYH'mMdDyYHmMHimMdDyY '-Buffer = "yy" & Mιd$(DateStr, 1 , 4) & ' mm"~Case DateStr Like "[dD][dD][dD][dD][imMdDyY][mM][mM]*"~Buffer = "yy" & Mιd$(DateStr, 1 , 4) & "m"~Case DateStr Like "[dD][dD][dD][dD][imMdDyY][mM][imMdDyY]*"-Buffer = "yy" & Mιd$(DateStr, 1 , 4) & "m"~Case DateStr Like "[dD][dD][dD][dD][mM][mM]*"~Buffer = "yy" & Mιd$(DateStr, 1 , 3) & "m"~Case DateStr Like "[dD][dD][dD][dD][mM][imMdDyY]*"~Buffer = "yy" & Mιd$(DateStr, 1 , 3) & "m"~Case DateStr Like "[dD][dD][dD][dD][imMdDyY][imMdDyY]['mMdDyY][imMdDyY]"'~Buffer = "yy" & MιdS(DateStr, 1 , 6)~Case DateStr Like "[imMdDyY][imMdDyY][imMdDyY][dD][dD][dD][imMdDyY][imMdDyY][imMdDyY][mM]*"~Buffer = "yy" & LeftS(DateStr, 2) & Mιd$(DateStr, 4, 5) & "m"~Case DateStr Like
"[imMdDyY][imMdDyY][imMdDyY][dD][dD][dD][imMdDyY][imMdDyY][mM][mM]*"~Buffer = "yy1 & LeftS(DateStr 2) & Mιd$(DateStr, 4, 5) & "m"~Case DateStr Like
"[imMdDyY][lmMdDyY][imMdDyY][dD][dD][dD][imMdDyY][imMdDyY][mM][imMdDyY]*"~Buffer = "yy" & Left$(DateStr, 2) & Mιd$(DateStr, 4, 6)~Case DateStr Like mMdDyY][imMdDyY][imMdDyY][dD][dD][dD][imMdDyY][mM][mM]*"~Buffer = "yy" & LeftS(DateStr, 2) & Mιd$(DateStr, 4, 5)~Case DateStr Like
"[imMdDyY][imMdDyY]['mMdDyY][dD][dD][dD][imMdDyY][mM][imMdDyY]*"~Buffer = "yy" & Left$(DateStr 2) & Mιd$(DateStr, 4, 5)~Case DateStr Like "[|mMdDyY][lmMdDyY][imMdDyY][dD][dD][dD][mM][mM]*"~Buffer = "yy" & Left$(DateStr, 2) & Mιd$(DateStr, 4, 4)~Case DateStr Like "[imMdDyY][imMdDyY][imMdDyY][dD][dD][dD][mM][imMdDyY]*"~Buffer = "yy" & LeftS(DateStr, 2) & MιdS(DateStr, 4, 4)~Case DateStr Like
"[imMdDyY][imMdDyY][imMdDyY][dD][dD][dD][imMdDyY][imMdDyY][imMdDyY][imMdDyY]*"~Buffer = "yy" & LeftS(DateStr, 2) & Mιd$(DateStr, 4, 6)~Case DateStr Like
"[imMdDyY][imMdDyY][dD][dD][dD][imMdDyY][imMdDyY][imMdDyY][mM]*"~Buffer = "yy" & LeftS(DateStr, 1 ) & Mιd$(DateStr, 3, 5) & "m"~Case DateStr Like "[imMdDyY][imMdDyY][dD][dD][dD][imMdDyY][imMdDyY][mM][mM]*"~Buffer = "yy" & LeftS(DateStr, 1 ) & MιdS(DateStr, 3, 5) & "m"~Case DateStr Like mMdDyY][imMdDyY][dD][dD][dD][imMdDyY][imMdDyY][mM][imMdDyY]*"~Buffer = "yy" & LeftS(DateStr, 1 ) & Mιd$(DateStr, 3, 6)~Case DateStr Like
"[imMdDyY][imMdDyY][dD][dD][dD][imMdDyY][mM][mM]*"~Buffer = "yy" & LeftS(DateStr, 1 ) & MιdS(DateStr 3 5)~Case DateStr Like "['mMdDyY][imMdDyY][dD][dD][dD][imMdDyY]imM][imMdDyY]*"~Buffer = "yy" & LeftS(DateStr, 1 ) & Mιd$(DateStr 3, 5)~Case DateStr Like "[lmMdDyY][imMdDyY][dD][dD][dD][mM][mM]*"~Buffer = "yy" & Left$(DateStr 1 ) & MιdS(DateStr, 3, 4)~Case DateStr Like "[lmMdDyY][lmMdDyY][dD][dD][dD][mM][imMdDyY]*"-Buffer = "yy" & Left$(DateStr, 1 ) & Mιd$(DateStr, 3, 4)~Case DateStr Like
"[imMdDyY][imMdDyY][dD][dD][dDHimMdDyY][imMdDyY][imMdDyY][imMdDyY]*"~Buffer = "yy" & Left$(DateStr, 1) & Mιd$(DateStr, 3 6)~Case DateStr Like "[|mMdDyY][dD][dD][dD][imMdDyY][lmMdDyY][imMdDyY][mM]*"~Buffer = "yy" & Mιd$(DateStr, 2, 5) & "m"~Case DateStr Like mMdDyY][dD][dD][dD][imMdDyY][imMdDyY][mM][mM]*"~Buffer = "yy" &
Mιd$(DateStr, 2, 5) & "m"-Case DateStr Like "[lmMdDyY][dD][dD][dD][imMdDyY][imMdDyY][mM][imMdDyY]*"~Buffer = "yy" & Mιd$(DateStr, 2, 6)~Case DateStr Like "[imMdDyY][dD][dD][dD][imMdDyY][mM][mM]*"~Buffer = "yy" & Mιd$(DateStr, 2, 5)~Case DateStr Like "[|mMdDyY][dD][dD][dD][imMdDyY][mM][imMdDyY]*"~Buffer = "yy" & Mιd$(DateStr, 2, 5)~Case DateStr Like "[imMdDyY][dD][dD][dD][mM][mM]*"~Buffer = "yy" & Mιd$(DateStr, 2, 5)~Case DateStr Like "[imMdDyY][dD][dD][dD][mM][lmMdDyY]*"~Buffer = "yy" & MιdS(DateStr, 2, 4)~Case DateStr Like
"[imMdDyY][dD][dD][dD][imMdDyY][imMdDyY][imMdDyY][imMdDyY]*"~Buffer = "yy" & Mιd$(DateStr, 2, 6)~Case DateStr Like "[dD][dD][dD][lmMdDyY][imMdDyY][lmMdDyY][mM]*"~Buffer = "yy" & Mιd$(DateStr, 1 , 3) & "mm"~Case DateStr Like "[dD][dD][dD][imMdDyY][imMdDyY][mM][mM]*"~Buffer = "yy" & MιdS(DateStr, 1 , 3) & "mm"-Caεe DateStr Like "[dD][dD][dD][imMdDyY][imMdDyY][mM][imMdDyY]*"~Buffer = "yy" & Mιd$(DateStr, 1 , 3) & "mm"~Case DateStr Like "[dD][dD][dD][imMdDyY][mM][mM]*"~Buffer = "yy" & Mιd$(DateStr 1 , 3) & "m"~Case DateStr Like
"[dD][dD][dD][imMdDyY][mM][imMdDyY]*"~Buffer = "yy" & Mιd$(DateStr, 1 , 3) & "m"~Case DateStr Like "[dD][dD][dD][mM][mM]*"~Buffer = "yy" & MιdS(DateStr, 1 , 2) & "m' ~Case DateStr Like "[dD][dD][dD][mM][imMdDyY]*"~Buffer = "yy" & Mιd$(DateStr, 1 , 2) & "m"~Case DateStr Like "[dD][dD][dD][imMdDyY][imMdDyY][imMdDyY][imMdDyY]*"~Buffer = "yy" & Mιd$(DateStr, 1 , 5)~Case DateStr Like "[imMdDyY][imMdDyY][imMdDyY][dD][dD]['mMdDyY][imMdDyY][imMdDyY][mM]*"~Buffer = "yy" & Left$(DateStr, 2) &
Mιd$(DateStr, 4, 4) & "m"~Case DateStr Like
"[imMdDyY][imMdDyY][imMdDyY][dD][dD][lmMdDyY][imMdDyY][mM][mM]*"~Buffer = "yy" & LeftS(DateStr, 2) & Mιd$(DateStr, 4, 4) & "m"~Case DateStr Like "['mMdDyY][imMdDyY][imMdDyY][dD][dD][imMdDyY][imMdDyY][mM]['mMdDyY]*"-Buffer = "yy" & Left$(DateStr, 2) & Mιd$(DateStr, 4, 5)~Case DateStr Like mMdDyYJpmMdDyYH'mMdDyY D DltimMdDyYH MJfmMr'-Buffer = "yy" &
Left$(DateStr 2) & Mιd$(DateStr, 4, 4)~Case DateStr Like
"[imMdDyY][imMdDyY][imMdDyY)[dD][dD][imMdDyY][mM][imMdDyY]-"~Buffer = "yy" & Left$(DateStr, 2) & Mιd$(DateStr 4 4)-Case DateStr Like "[|mMdDyY][imMdDyY][lmMdDyY][dD][dD][mM][mM]*"~Bufτer = "yy" &
Left$(DateStr, 2) & MιdS(DateStr 4, 3)~Case DateStr Like
"[imMdDyY][imMdDyY]['mMdDyY][dD][dD][mM][irnMdDyY]*"~Buffer = "yy" & Left$(DateStr, 2) & Mιd$(DateStr, 4 3)~Case DateStr Like "[imMdDyY][imMdDyY][imMdDyY][dD][dD][imMdDyY][imMdDyY][imMdDyY][imMdDyY]*"~Buffer = "yy" & Left$(DateStr, 2) & Mιd$(DateStr, 4, 5)~Case DateStr Like "[imMdDyY][imMdDyY][dD][dD][imMdDyY][imMdDyY][imMdDyY][mM]*"~Buffer = "yy" & LeftS(DateStr 1 ) &
Mιd$(DateStr, 3, 4) & "m"~Case DateStr Like mMdDyY][imMdDyY][dD][dD][imMdDyY][imMdDyY][mM][mM]*"~Buffer = "yy" & Left$(DateStr, 1 ) & Mιd$(DateStr, 3, 4) & "m"~Case DateStr Like
"[imMdDyY][imMdDyY][dD][dD][imMdDyY][imMdDyY][mM][imMdDyY]*"~Buffer = "yy" & Left$(DateStr 1 ) & Mιd$(DateStr, 3, 5)~Case DateStr Like "[imMdDyY][imMdDyY][dD][dD][imMdDyY][mM][mM]*"~Buffer = ' yy" & Left$(DateStr, 1 ) & Mιd$(DateStr, 3, 4)-Case DateStr Like
"[lmMdDyY][imMdDyY][dD][dD][imMdDyY][mM][imMdDyY]*"~Buffer = ' yy" & Left$(DateStr, 1) & MιdS(DateStr, 3 4)~Case DateStr Like "[imMdDyY][imMdDyY][dD][dD][mM][mM]*"~Buffer = "yy" & Left$(DateStr, 1) & MιdS(DateStr, 3, 3)-Case DateStr Like "[imMdDyY][imMdDyY][dD][dD][mM][imMdDyY]*"~Buffer = "yy" & Left$(DateStr 1 ) & MιdS(DateStr, 3, 3)~Case DateStr Like "[imMdDyY][imMdDy Y][dD][dD]['mMdDy Y][imMdDyY][imMdDyY][imMdDyY]*"~Buffer = "yy" & Left$(DateStr, 1 ) &
Mιd$(DateStr, 3, 5)-Case DateStr Like "[imMdDyY][dD][dD][imMdDyY][imMdDyY][imMdDyY][mM]*"~Buffer = "yy" & Mιd$(DateStr, 2, 4) & "m"~Case DateStr Like "[imMdDyY][dD][dD][imMdDyY][imMdDyY][mM][mM]*"~Buffer = "yy" & Mιd$(DateStr, 2, 4) & "m"~Case DateStr Like "[imMdDyY][dD][dD][imMdDyY][imMdDyY][mM][imMdDyY]*"~Buffer = "yy" & Mιd$(DateStr, 2, 5)~Case DateStr Like "['mMdDyY][dD][dD][imMdDyY][mM][mM]*"~Buffer = "yy" & Mιd$(DateStr, 2, 4)-Case DateStr Like "PmMdDyY][dD][dD][imMdDyY][mM][imMdDyY]*"~Buffer = "yy" & MιdS(DateStr, 2, 4)~Case DateStr Like "[imMdDyY][dD][dD][mM][mM]*"~Buffer = "yy" & Mιd$(DateStr, 2, 4)~Case DateStr Like "PmMdDyY][dD][dD][mM][imMdDyY]*"~Buffer = "yy" & Mιd$(DateStr, 2, 3)~Case DateStr Like "['mMdDyY][dD][dD][imMdDyY][imMdDyY][imMdDyY][imMdDyY]*"~Buffer = "yy" & Mιd$(DateStr, 2, 5)~Case DateStr Like "[dD][dD][imMdDyY][imMdDyY][imMdDyY][mM]*"~Buffer = "yy" & Mιd$(DateStr, 1 , 2) & "mm"~Case DateStr Like "[dD][dD][imMdDyY][imMdDyY][mM][mM]*"~Buffer = "yy" & Mιd$(DateStr, 1 , 2) & "mm"~Case DateStr Like
"[dD][dD][imMdDyY][imMdDyY][mM][>mMdDyY]*"~Buffer = ' yy" & MιdS(DateStr, 1 , 2) & "mm"~Case DateStr Like "[dD][dD][imMdDyY][mM][mM]*"~Buffer = "yy" & Mιd$(DateStr, 1 , 2) & "m"~Case DateStr Like "[dD][dD][imMdDyY][mM][imMdDyY]*"~Buffer = "yy" & Mιd$(DateStr, 1 , 2) & "m"~Case DateStr Like "[dD][dD][mM][mM]*"~Buffer = "yy" & Mιd$(DateStr, 1 , 1 ) & "m"~Case DateStr Like "[dD][dD][mM][imMdDyY]*"~Buffer = "yy" & Mιd$(DateStr, 1 , ) & "m"~Case DateStr Like "[dD][dD][imMdDyY][imMdDyY][imMdDyY]['mMdDyY]*"~Buffer = "yy" & Mιd$(DateStr, 1 , 4)~Case DateStr Like
"[imMdDyY][imMdDyY][imMdDyY][dD][imMdDyY][imMdDyY][imMdDyY][mM]*"~Buffer = "yy" & Left$(DateStr, 2) & Mιd$(DateStr, 4, 3) & "m"~Case DateStr Like "[imMdDyY][imMdDyY][imMdDyY][dD][imMdDyY][imMdDyY][mM][mM]*"~Buffer = "yy" & Left$(DateStr 2) & Mιd$(DateStr, 4, 3) & "m"-Case DateStr Like
"[imMdDyY][imMdDyY][imMdDyY][dD][imMdDyY][imMdDyY][mM][imMdDyY]*"~Buffer = "yy" & LeftS(DateStr, 2) & Mιd$(DateStr, 4, 4)-Case DateStr Like "[imMdDyY][imMdDyY][lmMdDyY][dD][imMdDyY][mM][mM]*"~Buffer = "yy" & Left$(DateStr, 2) & Mιd$(DateStr, 4, 3)~Case DateStr Like "[imMdDyY][imMdDyY][imMdDyY][dD][imMdDyY][mM][imMdDyY]*"~Buffer = "yy" & Left$(DateStr, 2) & Mιd$(DateStr 4, 3)-Case DateStr Like "[imMdDyY][imMdDyY][imMdDyY][dD][mM][mM]*"~Buffer = "yy" & Left$(DateStr, 2) &
Mιd$(DateStr, 4, 2)-Case DateStr Like "[imMdDyY][imMdDyY][imMdDyY][dD][mM][imMdDyY]*"~Buffer = "yy" & LeftS(DateStr, 2) & Mιd$(DateStr, 4, 2)~Case DateStr Like
"[imMdDyY][imMdDyY][imMdDyY][dD][imMdDyY][imMdDyY][imMdDyY][imMdDyY]*"~Buffer = ' yy' & Left$(DateStr, 2) & MιdS(DateStr, 4, 4)~Case DateStr Like "[imMdDyY][imMdDyY][dD][imMdDyY][imMdDyY]['mMdDyY][mM]*"~Buffer = "yy" & LeftS(DateStr, 1 ) & Mιd$(DateStr, 3, 3) & "m"~Case DateStr Like
"[imMdDyY][imMdDyY][dD][imMdDyY][imMdDyY][mM][mM]*"-Buffer = "yy" & Left$(DateStr, 1 ) & MιdS(DateStr, 3, 3) & "m"~Case DateStr Like "[imMdDyY][imMdDyY][dD][imMdDyY][imMdDyY][mM][imMdDyY]*"~Buffer = "yy" & Left$(DateStr, 1 ) & MιdS(DateStr, 3, 4)~Case DateStr Like mMdDyY]PmMdDyY][dD][imMdDyY][mM][mM]*"~Buffer = "yy" & Left$(DateStr, 1) & Mιd$(DateStr, 3, 3)~Case DateStr Like "[imMdDyY][imMdDyY][dD][imMdDyY][mM][imMdDyY]*"~Buffer = "yy" & Left$(DateStr, 1 ) & Mιd$(DateStr, 3, 3)~Case DateStr Like "[imMdDyY][imMdDyY][dD][mM][mM]*"~Buffer = "yy" & Left$(DateStr, 1 ) & Mιd$(DateStr, 3, 2)~Case DateStr Like "[imMdDyY][imMdDyY][dD][mM][imMdDyY]*"~Buffer = "yy" & Left$(DateStr, 1 ) & Mιd$(DateStr, 3, 2)~Case DateStr Like "[imMdDyY][imMdDyY][dD][imMdDyY][imMdDyY][imMdDyY][imMdDyY]*"~Buffer = "yy" & Left$(DateStr, 1 ) & Mιd$(DateStr, 3, 4)~Case DateStr Like "[imMdDyY][dD][imMdDyY][imMdDyY][imMdDyY][mM]*"~Buffer = "yy" & Mιd$(DateStr, 2, 3) & "m"~Case DateStr Like "[imMdDyY][dD][imMdDyY][imMdDyY][mM][mM]*"~Buffer = "yy" &
Mιd$(DateStr, 2, 3) & "m"~Case DateStr Like "[imMdDyY][dD][imMdDyY][imMdDyY][mM][imMdDyY]*"~Buffer = "yy" & Mιd$(DateStr, 2, 4)~Case DateStr Like "[imMdDyY][dD][imMdDyY][mM][mM]*"~Buffer = "yy" & Mιd$(DateStr, 2, 3)~Case DateStr Like "[imMdDyY][dD][imMdDyY][mM][imMdDyY]*"~Buffer = "yy" & Mιd$(DateStr, 2, 3)~Case DateStr Like "[imMdDyY][dD][mM][mM]*"~Buffer = "yy" & Mιd$(DateStr, 2, 3)~Case DateStr Like "[imMdDyY][dD][mM][imMdDyY]*"~Buffer = "yy" & Mιd$(DateStr, 2, 2)-Case DateStr Like
"[imMdDyY][dD][imMdDyY][imMdDyY][imMdDyY][imMdDyY]*"~Buffer = "yy" & Mιd$(DateStr, 2, 4)~Case DateStr Like "[dD][imMdDyY][imMdDyY][imMdDyY][mM]*"~Buffer = "yydmm"~Case DateStr Like "[dD][imMdDyY][imMdDyY][mM][mM]*"~Buffer = "yydmm"~Case DateStr Like "[dD][imMdDyY][imMdDyY][mM][imMdDyY]*"~Buffer = "yydmm' -Case DateStr Like "[dD][imMdDyY][mM][mM]*"~Buffer = "yydm"~Case DateStr Like "[dD][imMdDyY][mM][imMdDyY]*"~Buffer = "yydm"~Case DateStr Like
"[dD][mM][mM]*"~Buffer = "yyd"~Case DateStr Like "[dD][mM][imMdDyY]*"~Buffer = "yyd"~Case DateStr Like "[dD][imMdDyY][imMdDyY][imMdDyY][imMdDyY]*"~Buffer = "yy" & Mιd$(DateStr, 1 , 3)~Case Else-Buffer = ""-End Select-lf Buffer = "" Then~CntNotRect_Dates = CntNotRect_Dates + 1~Else~Put #1 , Position, Buffer-CntRect_Dates = CntRect Dates + 1~End If-End Sub—