-1
Good afternoon, guys, okay? I hope so. I’m having doubts about ordering the database data in ascending order of dates. var result = from r in context.name Where r.numero == 2 orderby r.datacadastro select r;
But do not return with ordered dates. it orders by day. for example: 01/09/2020 02/10/2019 03/02/2014 07/09/2020... I believe it has something to do with Sql Server being registered with American dates and VS is returning the dates in pt, or vice versa. How do I fix it?
Submit a [MCVE]
– Leandro Angelo
In your database, are these dates registered in a Date/Datetime field? Because from what you described, it is as if he is returning the dates in "alphabetical/numerical order", disregarding the ordering by date and rather considering as a string.
– Rafael