how to find last day 0f any given month in mysql?

Ads
 

how to find last day 0f any given month in mysql?

how to find last day of any given month in mysql?

View Answers

December 2, 2010 at 5:00 PM

Hi Friend,

Here is required code:

DECLARE @dtDate DATETIME
SET @dtDate = '8/18/2007'
SELECT DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,@dtDate)+1,0))

Thanks


December 22, 2010 at 2:08 PM

hi, SELECT LASTDAY('2003-02-05')FROM tablename

thanks,

Ads









Related Tutorials/Questions & Answers:
how to find last day 0f any given month in mysql?
Mysql last day of month
Advertisements
Find Day of Month
Mysql last day of month
Get Last Day of The Month
is this programm efficient to find the day of the given date . can it be more normalized ?
how to find the given date is sunday
Write a program to find a factorial in any given number
Day for the given Date in Java
How to find java jobs at any where in india
Output Previous or Next Day of the Month
Find out last character of array
Find Month name using DateFormatSymbols class.
how to find subarray from given large 2d array of arbritary dimension
How to Addding One Month with PHP ?
How to get day of week in Java?
Finding Last Modification Date of a file
How to get the Day name
Hi..How to Display Days by month - Java Beginners
plaz help me i try to compile from last 2 day .
plaz help me i try to compile from last 2 day .
How to design a day and night process, design a day and night process, day and night process
find the given input is integer or string
Write a java program to display the season given the month using switch case
PHP MySQLi
How to get day from date in Java using Calendar?
PHP MySQLi Affected Rows
how to show x axis values of timeline chart in jfreechart with particular month.
Java converts any given year to Roman Numeral
Find the Day of the Week
Java file last modified date

Ads