![]() |
Sorting of Date-Columns |
Post Reply
|
| Author | |
cbickel
Newbie
Joined: 31 January 2006 Location: Austria Status: Offline Points: 6 |
Post Options
Thanks(0)
Quote Reply
Topic: Sorting of Date-ColumnsPosted: 31 January 2006 at 4:22pm |
|
How can I specify columns as "date" - columns to get them sorted properly ?
|
|
|
Christian Bickel
Consolidate |
|
![]() |
|
sserge
Moderator Group
Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
Quote Reply
Posted: 01 February 2006 at 4:37am |
|
Hi,
Look into Sub SetDateItem() in the sample app. When you set item value with Date type, it will be automatically properly sorted. -- WBR, Serge |
|
![]() |
|
LeeHayton
Senior Member
Joined: 25 November 2005 Location: United Kingdom Status: Offline Points: 102 |
Post Options
Thanks(0)
Quote Reply
Posted: 02 February 2006 at 4:27am |
|
When you add the date the report does not know what type of field it is so you need to tell it by encapsulating it in the CDate() command. Set Item = Record.AddItem(CDate(RS!RegDate)) This works great for me! The same goes for strings cstr(), integers cint(), etc. which orders number columns numerically as opposed to alphabetically. |
|
![]() |
|
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 |