Code:
Sub Mrz_snb() ' https://eileenslounge.com/viewtopic.php?p=316419#p316419
Rem 0 Somne stuff to help show the sort of date format is in the system
Dim XlToday As Date, VBAToday As Date
Let XlToday = Evaluate("=Today()"): Let VBAToday = Date
Debug.Print Application.OperatingSystem & " XLToday " & XlToday; " VBAToday " & VBAToday
Dim Valory As String, vTemp As Variant, c00 As Variant
Let Valory = "Mon, 04 Mrz 2024 08:48:08 GMT": c00 = "Mon, 04 Mrz 2024 08:48:08 GMT"
Rem https://www.excelfox.com/forum/showthread.php/2909-Appendix-Thread-Evaluate-Range-(-Codes-for-other-Threads-HTML-Tables-etc-)/page61#post24134
Let vTemp = Evaluate("30*row(1:12)") ' {30; 60; 90; 120; 150; 180; 210; 240; 270; 300; 330; "360"}
Let vTemp = Evaluate("text(30*row(1:12),""[$-407]mmm"")") ' "Jan"
Let vTemp = [text(30*row(1:12),"[$-407]mmm")] ' "Jan"
Let vTemp = Evaluate("if({1},text(30*row(1:12),""[$-407]mmm""))") ' {"Jan"; "Feb"; "Mrz"; "Apr"; "Mai"; "Jun"; "Jul"; "Aug"; "Sep"; "Okt"; "Nov"; "Dez"}
Let vTemp = [IF({1},text(30*row(1:12),"[$-407]mmm"))] ' {"Jan"; "Feb"; "Mrz"; "Apr"; "Mai"; "Jun"; "Jul"; "Aug"; "Sep"; "Okt"; "Nov"; "Dez"}
Let vTemp = [TEXT(30*COLUMN(A:L),"[$-407]mmm")] ' "Jan"
Let vTemp = Evaluate("TEXT(30*COLUMN(A:L),""[$-407]mmm"")") ' "Jan"
Let vTemp = [IF({1},TEXT(30*COLUMN(A:L),"[$-407]mmm"))] ' {"Jan", "Feb", "Mrz", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"}
Let vTemp = Evaluate("IF({1},TEXT(30*COLUMN(A:L),""[$-407]mmm""))") ' {"Jan", "Feb", "Mrz", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"}
' So what we got is a 1 D array of the months as Excel has them for Germany
Let vTemp = Application.Match(Mid(c00, 9, 3), vTemp, 0) ' 3
Let vTemp = Replace(Mid(c00, 6, 20), Mid(c00, 8, 5), "-" & vTemp & "-") ' 04-3-2024 08:48:08
Rem https://www.excelfox.com/forum/showthread.php/2909-Appendix-Thread-Evaluate-Range-(-Codes-for-other-Threads-HTML-Tables-etc-)?p=24135&viewfull=1#post24135
Debug.Print CDate(vTemp) ' KB 04-03-2024 08:48:08 SSD2 04.03.2024 08:48:08
Let vTemp = CDate(vTemp)
Debug.Print vTemp ' KB 04-03-2024 08:48:08 SSD2 04.03.2024 08:48:08
' 2b
Dim Dte As Date
Let Dte = vTemp: Debug.Print Dte
Debug.Print CDate(Replace(Mid(c00, 6, 20), Mid(c00, 8, 5), "-" & Application.Match(Mid(c00, 9, 3), [transpose(text(30*row(1:12),"[$-407]mmm"))], 0) & "-"))
' 2c
Let vTemp = Evaluate("IF({1},TEXT(30*COLUMN(A:L),""[$-407]mmm""))") ' {"Jan", "Feb", "Mrz", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"}
Let vTemp = Application.Match(Mid(c00, 9, 3), vTemp, 0) ' 3
Let vTemp = Replace(Mid(c00, 6, 20), Mid(c00, 8, 5), "/" & vTemp & "/") ' 04/3/2024 08:48:08
Debug.Print CDate(vTemp) ' KB 04-03-2024 08:48:08 SSD2 04.03.2024 08:48:08
'Dte As Date
Let Dte = vTemp: Debug.Print Dte ' KB 04-03-2024 08:48:08 SSD2 04.03.2024 08:48:08
End Sub
'
' KB Vista
' Windows (32-bit) NT 6.00 XLToday 04-17-2024 VBAToday 04-17-2024
' 04-03-2024 08:48:08
' 04-03-2024 08:48:08
' 04-03-2024 08:48:08
' 04-03-2024 08:48:08
' 04-03-2024 08:48:08
' 04-03-2024 08:48:08
' SerSzuD2
' Windows (32-bit) NT :.00 XLToday 17.04.2024 VBAToday 17.04.2024
' 04.03.2024 08:48:08
' 04.03.2024 08:48:08
' 04.03.2024 08:48:08
' 04.03.2024 08:48:08
' 04.03.2024 08:48:08
' 04.03.2024 08:48:08
Bookmarks