Link to home
Start Free TrialLog in
Avatar of EuroCasaCar
EuroCasaCar

asked on

Check if a date is within two ther dates?

Hello,

I'm making a price calculation function in asp.net c#.
The prices changed with the seasons. I want my function to get the right season. Hard to explane. Here's an example.

Low Season: 2009-01-01 -- 2009-03-15
Mid season: 2009-03-16 -- 2009-07-18
High season 2009-07-19 - 2009-12-31

My date 2009-05-21 falls in the Mid season dates. Whats the best practice?

Best regards,

Daniel
ASKER CERTIFIED SOLUTION
Avatar of TheMegaLoser
TheMegaLoser
Flag of Sweden image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of EuroCasaCar
EuroCasaCar

ASKER

Both codes worked for me after some changes. Thanks a lot.