How do I calculate the last day of the month in SQL?
New to SQL, but how would you determine the last day of the month value from datetime (trans_date).
Sorry just a dumb question, but rather than using current date can I specify a trans_date (date) from trans table
Pinal Dave has a good explanation here:
Keep in mind that if you're using SQL2008 you can
CAST( field AS DATE) to get rid of the resulting time data.