kurze Frage. Wie kann ich am schnellsten einen SQL-Output über MSQuery im Txt-Format(Zeit1: 0745; Zeit2: 1630) in ein Uhrzeitformat umwandeln, zwecks Weiterverrechnung?
Ziel: 07:45 und 16:30 Uhr.
Für kurzes Feedback besten Dank
Andreas
Sub Change_SQL_String()
Dim import As String, i As Integer
Dim myExtract As Variant
Dim myTime As Variant
import = "Zeit1: 0745; Zeit2: 1630"
myExtract = Split(import, ";")
For i = 0 To UBound(myExtract)
myTime = Trim(myExtract(i))
myTime = TimeValue(Format(Left(Right(myTime, 4), 2) & ":" & Right(myTime, 2), "hh:mm"))
'Zum testen der Berechnung
Debug.Print myTime + TimeValue("00:15")
Next i
End Sub