DateTime column shows only the date part
#1
Posted 03 May 2006 - 07:10 PM
How can I have the full DateTime (date and time) displayed?
Thanks
#2
Posted 27 January 2007 - 08:35 PM
How can I have the full DateTime (date and time) displayed?
Thanks
Yes. I have the same problem. I spent one day to make a form. Everything was fine and at last I found the Date column doesn't show the time part. FormatMask does not work. I wish that it will be implemented in the next release.
Thanks
#3
Posted 27 January 2007 - 10:11 PM
Unfortunately, this is only DateColumn. If you are agree, I will speed up developing TimeColumn. You may post here how do you like that this column work.
Thank you.
regards
One change,
I have add Time support to DateColumn. But, I think that having TimeColumn is good idea.
regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#4
Posted 28 January 2007 - 10:38 AM
I think it is good if you create two more columns: TimeColumn and DateTimeColumn. How it works?
For the TimeColumn:
- It can be edited in a spinedit
- It can be sorted by Time value
For the DateTimeColumn
- It can be edited in a spinedit or Calendar Pickup
- It can be sorted by DateTime value
In addition, the two columns can have its own date, time formats or it can use the system setting values in TFormatSettings (in unit SysUtils). For me, it should have its own formats and independent from the system format.
Regards
#5
Posted 28 January 2007 - 11:30 AM
Idea for a TimeColumn picker: an analog clock with an AM/PM toggle and Set button (like Raize components).
For DateTimeColumn: anything will do - spinedits below the calendar would be great.
BTW Ability to select HH:MM:SS would be nice (I personally require SS) in the datetimecolumn and timecolumn.
Any ETA for the DateTimeColumn?
Looking forward to this :-)
#6
Posted 28 January 2007 - 06:12 PM
I have already upload files with DateTime support in TNxDateColumn.
I will speed now developement on NxTimeColumn (and NxTimeEdit).
regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#7
Posted 28 January 2007 - 08:26 PM
Is this in the update package from 2 days ago in the user area? I tried this and my TNxDateColumn still shows only the date. Anything special I have to do, or do I have the wrong version?
Thanks for the hard work as always :-)
#8
Posted 28 January 2007 - 09:59 PM
It seems that I have add it after I release it. I will re-upload it again now.
regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#9
Posted 28 January 2007 - 11:33 PM
It seems that I have add it after I release it. I will re-upload it again now.
regards
I grabbed the new .exe but I still only have date (no time displayed) in the nxDateColumn. Is there some flag to enable to allow time selection?
#10
Posted 29 January 2007 - 04:15 AM
I have already upload files with DateTime support in TNxDateColumn.
I will speed now developement on NxTimeColumn (and NxTimeEdit).
regards
Hello,
Another idea is we just need one NxDateTimeColumn and let user decide which data will be displayed.
Regards
#11
Posted 29 January 2007 - 03:14 PM
Not such a bad idea! It's seems just a matter of a datetimeformat property (string like the formatdate stuff) and link the editing to various the format parts (if it's for instance 'dd' you just call incday with +/- 1 and update the field).
#12
Posted 29 January 2007 - 05:41 PM
Do you have try next code:
Add one TNxDateColumn and add next code after ButtonClick:
NextGrid1.Cell[0,0].AsDateTime := Now();
You may control appearance with FormatMask property very easy.
regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#13
Posted 30 January 2007 - 04:41 PM
Not such a bad idea! It's seems just a matter of a datetimeformat property (string like the formatdate stuff) and link the editing to various the format parts (if it's for instance 'dd' you just call incday with +/- 1 and update the field).
But if there is one DateTime column, may be it makes confuse about sorting. The data will be sorted by the real datetime data or by the time if the column displays the time only.
#14
Posted 30 January 2007 - 04:45 PM
I would prefer sorting to be based on DateTime unless i use the OnCompare Event.
Strange Display Format = Do sorting yourselves.
#15
Posted 30 January 2007 - 04:49 PM
I would prefer sorting to be based on DateTime unless i use the OnCompare Event.
Hello,
I agree with you on this.
Regards
#16
Posted 31 January 2007 - 10:52 AM
i think its time, that sorting will be automatic too
(also for nextdbgrid)
#17
Posted 02 February 2007 - 08:22 AM
Add one TNxDateColumn and add next code after ButtonClick:
NextGrid1.Cell[0,0].AsDateTime := Now();
You may control appearance with FormatMask property very easy.
Thanks, works like a charm.
Regards
Kon
#18
Posted 02 February 2007 - 10:05 AM
Edit:
Changed this in NxEdit to fix date hilighting:
function TNxDatePicker.GetAsDateTime: TDateTime;
begin
if (Text = '') or (Text = '0') then Result := Today
else Result := encodedate(yearof(StrToDateTime(Text)),monthof(StrToDateTime(Text)),dayof(StrToD
ateTime(Text)));
end;
#19
Posted 14 May 2007 - 06:17 PM
I am working with the NxDateColumn at the moment, but an NxTimeColumn would be very usefull to me. Therefore my first question: are there any updates to when the NxTimeColumn would be ready?
When looking for a way to display time only in a NxDateColumn I stumbled upon this interesting thread. I read this remark from Boki:
regards
So I figured since the TNxDateColumn now is "DateTime compatible" I could use the FormatMask 'HH:mm' to display only the time part right? Well... Wrong actually. It does display the time, and ommits the date part. However, when displaying data the time separator was shown as a random character. (E.g. 12#23 or 12}23 in stead of 12:23)
Next step: diving into the sources. After some time I found the following method:
{$IFNDEF DELPHI6}
var
FormatSettings: TFormatSettings;
{$ENDIF}
begin
if FormatMask <> '' then
begin
{$IFNDEF DELPHI6}
FormatSettings.ShortDateFormat := FormatMask;
FormatSettings.DateSeparator := DateSeparator;
Result := DateTimeToStr(StrToDateTime(Value), FormatSettings) + TextAfter;
{$ELSE}
Result := DateTimeToStr(StrToDateTime(Value)) + TextAfter;
{$ENDIF}
end else Result := Value + TextAfter;
end;
The intire FormatMask is assigned to only the SortDateFormat. Since the FormatSettings doesn't get initialized fully the FormatSettings.TimeSeparator can have any random value. Even worse: a full FormatMask (E.g. yyyy-mm-dd hh:nn:ss) would serve little use? When I leave FormatMask empty it does display both the Date and Time part.
I can't set a TNxDateColumn.TimeSeparator property or something, nor does the FormatMask has any influence on the time-related members of FormatSettings. So is my assumption that FormatMask doesn't influence the time part of a TDateTime correct? And if so: is this issue already beƫing adressed? I could fix this as I see fit in the code, but I prefer to leave the code as it is to simplify future updating
Thanks in advance for any answers
Regards,
Stijn.
#20
Posted 14 May 2007 - 06:25 PM
I'm using NextGrid, NextDBGrid version 3.9.8b. It was released in the users area the 3 of may I think.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users