WHERE month(Billing.BillingDate) = <whatever you enter>Something like that yes. It should basicly complete the YEAR part, me entering the MONTH, and the DAY can be any day "*".
THANX Lazy...!!! That worked 100%
Also
PHTech, please please please please use the following date format:
30-Jun-2009
I promise you it will save you MONTHS of headaches
Also
PHTech, please please please please use the following date format:
30-Jun-2009
I promise you it will save you MONTHS of headaches
Would you mind elaborating a bit?
I think I know what acid was onto there. Take today's date, is it 11-09-2009 or 09-11-2009 or 2009-11-09 or 2009-09-11 or 11-Aug-2009?
Only one of those is totally unambiguous if you don't know beforehand which date format you are working with.
Definitely 11 August, because the other options are either September or November![]()
lol my bad but you get the idea![]()
Exactly guys. Remember, your application may go to a PC that doesn't have the date configured exactly like the way you programmed it for. Using the sequence I described will give total transparency to the database (or related components) you're using that needs the date.
No computer in the world can't understand 12-Dec-2009, but some, depending on the regional settings, will struggle with 12/03/09
EDIT:
But I gather that AcidRaZor was specifically referring to displaying of the date.
A Procedure with a SELECT CONVERT instead of a concatenation of the various year/month/day could work well. A computed
column would be possible but could have some performance issues.
Yip..YYYY/MM/DD is the big daddy. Never had any issues.I read up somewhere that some standard set for dates (might be ISO) is to write it out as yyyyMMdd. We've had tons of date parsing issues with different servers having different regional settings. Since we changed it to yyyyMMdd we haven't had a single problem... yet.
No no no! Not yyyy/MM/dd, but yyyyMMdd (without the "/"). All our date formats were in yyyy/MM/dd and we had loads of trouble. Since removing the "/"-es and just formatting it as yyyyMMdd we haven't had any problems... YET.Yip..YYYY/MM/DD is the big daddy. Never had any issues.
Throughout this article, you'll notice that I use the ISO dateformat: yyyymmdd. This is a safe dateformat, meaning it should always work, no matter what your specific computer settings are. It is also unaffected by any SET DATEFORMAT or SET LANGUAGE settings.
FarligOpptreden is correct (I seem to be saying that too often)