weiß jemand, wie man ein Datum, das im DateFormat (als Zahl) vorliegt
in das Textformat (yyyy-mm-dd) konvertiert. Sodaß das Ergebnis ein Text ist?
sodaß beispielsweise aus der Zahl 39868 das Text-Datum "2009-02-24" wird?
Herzlichen Dank,
Born
Sub datum2Text()
With ActiveSheet
.Cells(1, 2).NumberFormat = "@"
.Cells(1, 2).Text = Format(.Cells(1, 1).Value, "yyyy-mm-dd")
.Cells(1, 2).NumberFormat = "General"
End With
End Sub
Niemand hat etwas davon, wenn Du einen zu hohen Level angibst. Gibt nur Frust auf beiden Seiten, wenn die Antworten nicht verstanden werden.
Gruss, Jogy
Range("A2") = "'" & Format(Range("A1"), "yyyy-mm-dd")
Gruß Tino