TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
narasiman rao
NA
519
766.9k
how to add date part query in design page code
Dec 27 2012 8:44 AM
date part using query
1st query
select Name,DOB = case datepart(year,dob) when '1900' then ''else CONVERT(varchar, DOB, 103) end,Mobileno as Mobile_Number,Wedding = case datepart(year,Weddingday) when '1900' then '' else CONVERT(varchar, Weddingday, 103) end,EMail as E_Mail from BirthDayWish where Active = 'A' ORDER BY Name
i written this query it is working fine.
in the design page i write query as follows;
2ndquery
Sql = "select Name,CONVERT(varchar, DOB, 103) AS Date_of_birth,Mobileno as Mobile_Number,CONVERT(varchar, Weddingday, 103) AS Wedding_Day,EMail as E_Mail from BirthDayWish where Active = 'A' ORDER BY Name";
from the above 1st query how to add the datepart query in the 2nd sql query.
2nd query refers to want to written in staff.aspx.cs page.
Reply
Answers (
1
)
In GridView Date should be displayed in correct format
doesnt work