| Autor |
Beitrag |
foxy
      
Beiträge: 814
Ubuntu, Gentoo
C++, PHP, Java, Ruby, Perl (Eclipse)
|
Verfasst: Fr 13.12.02 12:53
Sers Leute ....
also ich glaub ich steh auf dem Schlauch ... zu meinem Problem
ich habe so einen string
2002- 8-30 11:10:41;2002- 8-30 13:32: 3
filtere mit copy diese beiden werte raus 11:10:41,13:32: 3
so diese setz ich als variable TDateTime...
jetzt zu meinem problem wenn da son sche*** leerzeichen ist dann sacht er das das keine zeitangabe ist ich habsch schon so versucht
Quelltext 1: 2:
| Strtime:=(copy(zeilenliste.Strings[j],12,8)); gefZeit1:=StrToTime(stringz.deleteFirstLastLZ(StrTime)); |
aber es will einfach nicht gehn ....  ich verstehs nicht .... 
_________________ "Only wimps use tape backup: real men just upload their important stuff on ftp, and let the rest of the world mirror it." (Linus Torvalds)
OperatingSystem Laptop (Ubuntu Hardy)
|
|
Tino
      

Beiträge: 9839
Erhaltene Danke: 45
Windows 8.1
Delphi XE4
|
Verfasst: Fr 13.12.02 13:02
Hi,
dann wandle doch vorher alle Leerzeichen in 0 um. Also ungefähr so:
Quelltext 1: 2:
| While Pos (' ', Str) > 0 Do Str [Pos (' ', Str)] := '0'; |
Gruß
TINO
|
|
foxy 
      
Beiträge: 814
Ubuntu, Gentoo
C++, PHP, Java, Ruby, Perl (Eclipse)
|
Verfasst: Fr 13.12.02 13:13
das iss ne idee danke
aber was du als Str. dahingeschrieben hast das iss doch mein StrTime oder iss das noch ein andere wert den ich verwenden muss??
_________________ "Only wimps use tape backup: real men just upload their important stuff on ftp, and let the rest of the world mirror it." (Linus Torvalds)
OperatingSystem Laptop (Ubuntu Hardy)
|
|
Tino
      

Beiträge: 9839
Erhaltene Danke: 45
Windows 8.1
Delphi XE4
|
Verfasst: Fr 13.12.02 13:24
ohne Worte
Quelltext 1:
| Str := '11:10:41,13:32: 3'; |
Gruß
TINO
|
|
foxy 
      
Beiträge: 814
Ubuntu, Gentoo
C++, PHP, Java, Ruby, Perl (Eclipse)
|
Verfasst: Fr 13.12.02 13:51
_________________ "Only wimps use tape backup: real men just upload their important stuff on ftp, and let the rest of the world mirror it." (Linus Torvalds)
OperatingSystem Laptop (Ubuntu Hardy)
|
|
smiegel
      
Beiträge: 992
Erhaltene Danke: 1
WIN 7
D7 Prof., C#, RAD XE Prof.
|
Verfasst: Fr 13.12.02 16:49
Hallo,
es geht auch Schleife:
Quelltext 1: 2:
| strTime1:=(copy(zeilenliste.Strings[j],31,8)); StringReplace(strTime1, ' ', '0', [rfReplaceAll, rfIgnoreCase]); |
_________________ Gruß Smiegel
Ich weiß, daß ich nichts weiß, aber ich weiß mehr als die, die nicht wissen, daß sie nichts wissen. (Sokrates)
|
|
|