Correct dateformar in Excel

Hi,

I want the dates in my excel look like dd-MM-yyyy. With the format cells activity it looks correct but when I try to filter the dates it is all messed up. How do I get the correct date-format in Excel?

image

image

@Dion

May I know what is differnet?

Cheers

You see the dates where the day and month are < 12 under the years (you do not really see them but they are there) and all the other dates are not seen as dates by excel.

Like this:

1 Pass the range
2 Click on the set format

Hi, I have tried that but it does not give me the “dd-MM-yyyy” option. I do it like this but that is also not the solution:

image

if you want to filter it manually you can change the format of the column and then try
and if trying to compare date in code then first change date from string to datetime and then compare this should help you

Solution; change value in dt with Datetime.ParseExact(CurrentRow(“Vervaldatum”).ToString,“dd-MM-yyyy”,nothing).ToOADate

Then format with:

image

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.