![]() |
Datum aus TDateTime
Hallo. Irgendwie kann ich keine Funktion finden, die mir aus einen TDATETIME ein TDATE zurück gibt. kann mir bitte jemand helfen.
|
Re: Datum aus TDateTime
Delphi-Quellcode:
<Datum> := Trunc( <TDateTime>);
|
Re: Datum aus TDateTime
Delphi-Quellcode:
Gruß oki
MyStringDate := FormatDateTime('dd.mm.yyyy', Now);
|
Re: Datum aus TDateTime
Dankeschön!
Delphi-Quellcode:
Das ist für mich neu ;) Diese Funktion habe ich immer für andere Zwecke benutzt ;)
<Datum> := Trunc( <TDateTime>);
|
Re: Datum aus TDateTime
Zitat:
|
Re: Datum aus TDateTime
Es ist aber sauberer, DateOf zu verwenden. Momentan gilt noch TDateTime = type Double. Aber wehe wenn das mal ein record oder object wird. Mit dem "bequemen" Verwenden von TDateTime als float handelt man sich Kompatibilitätsprobleme ein.
|
Re: Datum aus TDateTime
Zitat:
Mit TDateTime als Float kommt in jeder Spracheinstellung das richtige Datum heraus, wenn man es aus einer Datei liest. |
Re: Datum aus TDateTime
Mit der Funktion DateOf auch.[delphi]
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 00:00 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz