Click here to Skip to main content
15,914,109 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Here iam creating one BLOG site.My Requirement is In Front end i have these controls

Date:
Message:
Keywords:
Subject:
Submit(Button)

we entering all fields and press Submit The Data Will be Stored in DB and displays Only Message and Date.
Like
2014:
January
Febraury
March
.
.
.December

When we select january it shows the Messages in January month with Date Wise.
but in my Table i have only Date column,there is no column for Month.Here i will display the month names based upon the Date.how can i do it?
give me reply.
I hope you understand.pls help me
Posted

1 solution

You can extract the month from your date,

E.g.
SQL
select DateName(mm,getdate())


Same way you may also need Year also

SQL
select Datepart(YY,getdate())


Pass your date column in place of getdate()
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900