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:
Mysql last day of month
Mysql last day of month
Advertisements
is this programm efficient to find the day of the given date . can it be more normalized ?
Write a program to find a factorial in any given number
How to find java jobs at any where in india
Output Previous or Next Day of the Month
how to find subarray from given large 2d array of arbritary dimension
Find out last character of array
Find Month name using DateFormatSymbols class.
ModuleNotFoundError: No module named 'odoo8-addon-contract-recurring-invoicing-monthly-last-day'
How to Addding One Month with PHP ?
find the given input is integer or string
How to get day of week in Java?
Finding Last Modification Date of a file
How to get the Day name
Java converts any given year to Roman Numeral
Write a java program to display the season given the month using switch case
How to design a day and night process, design a day and night process, day and night process
How to get day from date in Java using Calendar?
ModuleNotFoundError: No module named 'mysqlx-connector'
How can I master Java in one month?
how to show x axis values of timeline chart in jfreechart with particular month.
plaz help me i try to compile from last 2 day .
plaz help me i try to compile from last 2 day .
find factorial of any number using recursion
Mysql Date Month
how to create month wise serial number in java?
Write a program that converts any given year to Roman Numeral in Java
How to get day from date in SQL?
How to change day to night scene, change day to night scene, day to night scene
C file Last Modified Date

Ads