Re: [2.0] date formatting...
Code:
DateObject.ToString("dd-MMM-yyyy");
Re: [2.0] date formatting...
The real question is why are you storing dates in a database as text when you should be storing them as date objects? Then you would use a date literal, e.g. #7/07/2006#, or a parameter of appropriate type. Dates should be maintained as date objects wherever possible and only converted to strings when you need to display them. That way you can always perform comparisons or arithmetic on the date objects with ease and there is no issue with conversion or format because date objects have no format. It's only when converting to or from strings that format becomes an issue so if you avoid that the issue never arises.