2
Excel宏日期解析器无法处理一位数的日期
从这个和其他网站的先前问题,我得到了一个功能,可以解析和查找文本字符串或单元格中的日期。这是功能: Function GetDate(strInput As String) As Date Dim DateFormat() As String Dim intDateLength As Integer Dim intMaxFormat As Integer Dim intFrmtCtr As Integer Dim intPosition As Integer intMaxFormat = 6 ReDim DateFormat(1 To intMaxFormat) DateFormat(1) = "*##[-/]##[/-]####*" DateFormat(2) = "*#[-/]##[-/]####*" DateFormat(3) = "*##[-/]#[-/]####*" DateFormat(4) = "*##[-/]##[-/]##*" DateFormat(5) = "*#[-/]##[-/]##*" DateFormat(6) …