Autor Beitrag
Kalippo
Hält's aus hier
Beiträge: 2



BeitragVerfasst: Di 25.04.06 13:52 
Hallo!

Habe folgendes Problem ich ein Datum in einem String finden.

Habe das Datumsformat z. B. MM_DD_YYYY und folgenden String 'abcd_01_jd_01_02_hallo_01_02_2006_Test1234'.
Nun möchte ich das Datum 01_02_2006 herausbekommen..

Ich hoffe ihr könnt mir helfen

MfG

Kalippo


Moderiert von user profile iconGausi: Topic aus Algorithmen, Optimierung und Assembler verschoben am Sa 06.05.2006 um 10:34
Marco D.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Di 25.04.06 13:54 
Such mal nach Pos und Copy.

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Di 25.04.06 13:54 
Ist das Format des Strings immer gleich? Dann könntest du mit posex an hand der '_' die Position finden.

_________________
Markus Kinzler.
Kalippo Threadstarter
Hält's aus hier
Beiträge: 2



BeitragVerfasst: Di 25.04.06 14:12 
user profile iconmkinzler hat folgendes geschrieben:
Ist das Format des Strings immer gleich? Dann könntest du mit posex an hand der '_' die Position finden.


was ist posex? habe delphi 6
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Di 25.04.06 14:29 
posex ist eine Erweiterung von pos, bei der du einen Startwert angeben kannst.
Alterantiv ginge auch StrScan.

_________________
Markus Kinzler.