Autor Beitrag
vreden123
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 95
Erhaltene Danke: 2



BeitragVerfasst: Fr 28.06.13 20:40 
Hallo,

ich möchte eine UTC-Zeitangabe in einen timestamp umwandeln. Ob Unix oder nicht ist relativ egal, es muss nur eine Zahlenfolge sein mit der ich größer/kleiner abfragen stellen kann.

Also folgendes habe ich z.B. in einen String: Sat, 15 Jun 2013 11:06:21 GMT
Und diese Zeitangabe möchte ich in einen Timestamp umwandeln.
Gibt es in c# dafür eine Funktion?
Ich möchte den String nur ungern per Substr auseinander nehmen und ein neues DateiTime Objekt erstellen, dass muss auch "einfacher" gehen.


Gruß,
Vreden123
Th69
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Moderator
Beiträge: 4799
Erhaltene Danke: 1059

Win10
C#, C++ (VS 2017/19/22)
BeitragVerfasst: Sa 29.06.13 10:55 
Hallo,

dazu gibt es die DateTime.ParseExact-Methode, s. z.B. Easy String to DateTime, DateTime to String and Formatting.