adspace
How to keep seconds from being included in the display when
using TDateTimePicker?
Answer Posted / Shubham Goel
In Delphi, you can use the `FormatString` property of the TDateTimePicker component to format the date and time displayed. To exclude seconds, set the FormatString to 'dd MMM yyyy HH:nn'. Here's an example:
```delphi
MyDateTimePicker.FormatString := 'dd MMM yyyy HH:nn';
```
In this example, 'nn' represents minutes without seconds.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How to Get the time and date in Universal Time ?
How can one prevent a TForm from being moved or resized?
How to Change the owner of a component at runtime ?
How to Retrieve the line number that a memo's cursor is on?
How to Print in Delphi without using the TPrinter Unit ?
How to Create resource files?
How to Flush binary file from disk cache to disk ?
How to Change the default width/height of the editor?
How to Retrieving the program that is associated with a given extension?
How to Remove drives listed in a TDriveComboBox ?
How to Determine the last access time of a given file ?
How to Save a QuickReport custom preview to text?