Jump to content


Photo

Sorting Dates.


  • Please log in to reply
1 reply to this topic

#1 Speed

Speed
  • Members
  • 190 posts
  • Gender:Male

Posted 21 January 2017 - 03:29 AM

How does NextGrid 5 determine the date format? 

 

I have a text column which has the SortKind set to skDate.  It's populated from a database.  If the date is in local format (dd/mm/yyyy) then it sorts fine, but if it's in US format then it generates an invalid date error. 

 

I assume it's using the date format for my locale.  The problem for me is, when I grab a copy of a customer's database to investigate an issue, I keep getting errors when I try to sort by date.

 

It is possible to tell it programmatically the date format to use?

 

Thanks,

 

Steve

 

 

 

 

 



#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 21 January 2017 - 06:40 AM

Hi Steve,

If it can pass trough Cell.AsDateTime, then it's good. Date must be in local format. Maybe you will need to convert other non-local dates.
boki@bergsoft.net | LinkedIn Profile
--
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.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users