Sorting Date |
Post Reply |
Author | |
flauzer
Senior Member Joined: 30 December 2003 Location: Italy Status: Offline Points: 108 |
Post Options
Thanks(0)
Posted: 18 March 2005 at 4:12am |
sorry.....old problem on ReportControl (9.6.0.1 version )
Is there a way,(trick,workaround,....) that can sort a dateTIME column correctly.... (it has to work with at data and a TIME)???????? PS Item.SortPriority = CLng(Format(CStr(f.Value), "yyyymmddhh")) works until HOURS and not MINUTE...... Thanks |
|
gshawn
Senior Member Joined: 04 October 2004 Status: Offline Points: 227 |
Post Options
Thanks(0)
|
Is there any reason why you can't do
?
|
|
flauzer
Senior Member Joined: 30 December 2003 Location: Italy Status: Offline Points: 108 |
Post Options
Thanks(0)
|
I'd got "overflow" problem , to be honest some month ago....
I only want to know if someone uses correctly the datetime format without problems. Thanks...... |
|
flauzer
Senior Member Joined: 30 December 2003 Location: Italy Status: Offline Points: 108 |
Post Options
Thanks(0)
|
PS....
.....long limit is 2147483647 |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
How you add this report item? Try simply add it as date value. |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
flauzer
Senior Member Joined: 30 December 2003 Location: Italy Status: Offline Points: 108 |
Post Options
Thanks(0)
|
The problem is DATETIME.
This is my function, the result is WRONG::: ie:.... I obtain in Data column (decrescent): 23/10/2005 14.56 23/08/2005 14.53 14/05/2005 14.52 13/07/2005 14.53 06/03/2004 14.51 03/11/2005 14.56 03/06/2005 14:53 Public Function WrapRP(ByVal f As Field, ByRef Item As ReportRecordItem) '---------------------------------------------------- 'Wrap CodeJock grid '---------------------------------------------------- Select Case f.Type &nbs p; Case adDBTimeStamp, adDBDate &nbs p; &nbs p; If IsNull(f) Then &nbs p; Item.Value = vbNullString &nbs p; Else &nbs p; Item.Value = Format(CStr(f.Value), "dd/mm/yyyy hh:mm") &nbs p; Item.SortPriority = CLng(Format(CStr(f.Value), "yyyymmddhhmm")) &nbs p; End If &nbs p; &nbs p; Case Else &nbs p; &nbs p; If IsNull(f) Then &nbs p; Item.Value = vbNullString &nbs p; Else &nbs p; Item.Value = CStr(f) &nbs p; End If &nbs p; End Select End Function |
|
flauzer
Senior Member Joined: 30 December 2003 Location: Italy Status: Offline Points: 108 |
Post Options
Thanks(0)
|
Oleg,
I understand the changes.... Item.Value = f.Value and 'after' use the FORMAT method..... Item.Format =..... This work!!! |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |