Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

TElXTree: midnight displays as blank

ItemTree.Items.Item[0].Text := FormatDateTime('ddddd', d) + ' ' + '00:00:00' displays
"25/3/2013'
, and the column is centred, so it looks really bad.

The type of the column is Date & Time.

How can I ensure the time part is displayed and still be able to convert the cell to datetime using strtodatetime and still be able to sort on the column assuming date & time?

Thanks,
Raymond. 

Comments

  • 6 Comments sorted by Votes Date Added
  • Hi,

    I built a sample test with your code. It shows date and time, strtodatetime and sorting works ok. Am I missing something to reproduce your issue?
  • 14/2/2013 23:56:01
          14/2/2013
    15/2/2013 00:00:01

    Observe the middle entry. It does not display the hours, minutes and seconds for midnight.

    This is the prime issue.

    For a solution to exist, the other, secondary criteria must also be satisfied.

    Raymond
  • edited April 2013 Posts: 0Vote Up0Vote Down
    I reproduce the time cut-off issue only when I enter and edit cell's date and time. After editing, 0:00:00 part is cut off.
    This is a bug and is being fixed.

    Do you see the middle entry with time part absent right when the tree is shown or after cell was edited?
  • I think you are mixing 2 separate issues.

    This issue is about a time of midnight not displaying the time part.

    As it turns out, it is a Microsoft Windows issue!

    Windows doesn't display the time with a datetime string when the time is midnight.

    To work around this I have left-justified the datetime fields.

    If ElXTree could be made to display the full date time as

    14/2/2013 23:56:01
    14/2/2013 00:00:00
    15/2/2013 00:00:01

    that would be really good.

    Raymond

  • Hi Raymond, thank you for feedback.
    I'll check out if we can add some flag that would allow to override system locale settings
Sign In or Register to comment.