I have a application where in on selection of Month and year, the datagrid should be display, username and the dates, the username and number of leaves from the database. UserName 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19..
Sam P P Susi U P - Planned Leave U - Unplanned Leave
In database i have only Username, leave start and end date.
1.How to display the dates in column in datagrid based on month and year selection.
2.How to map the dates in the datagrid with the start and end date from sql server database
i want to use a ajax calender extender in which when user clixcks on button caleder show only dates of current month not previous dates.i dont want to disable dates. i should not apper on current month calender. means it should start from 1 and end to 30 or 31
DateTime ExpMonth = Convert.ToInt32(ddExpMonth); ---- DropDown(user selects a month) DateTime ExpYear = Convert.ToInt32(ddExpYear); ---- Dropdown(user selects year) Datetime ExpDate = ///// I want this part to be saved as Datetime 02/2012
CalendarExtender to my textbox. However i want to only be able to select month year. Not day month year. The end user should not be able to select dates. Furthermore i'd want by default my "from date" textbox to always select the 1st day of the month and "to date" to always be the last day of the month. I'm sure this is a common requirement of certain systems.
I have a date column in my table as '12/1/2009'. How can I have Month and Year from this date.
I am trying to export the report where in I have a drop down having options like December 2009, November 2009...etc. So when the user selects one of the options and click the button it should bring up all the rows with corresponding month and year matching with 12/1/09.
If the user the selects the December 2009. It should show up the rows with 12/1/09 or whatever rows that are present in that month and year.
I have a textbox that gets the date from an AJAX Calendar extender. What I need to do is extract the "month," "day," and "year," and put them into seperate string variables to use in my code to do various things based on the month, day or year respectively.
Here is what I have so far:
But I don't want the year NOW, I want the year from the textbox.
I have a date and I need to populate a drop-down with the months/years between that date and today. For instance, if that date is 10/14/2010 then the drop-down should contain October 2010, November 2010, December 2010, January 2010.
The way I'm thinking of doing this is to pass that date to a function, loop from today backwards step 1 month while adding each month to a collection until we reach that date and finally return a collection of strings. Then, populate the drop-down control on page load. Finally, use some ajax with a page method to parse back the string and trigger a partial page reload.
as of now i got a text box with extended calendar control to capture date of birth but has been giving me problems so i like to change it to day month and year combo controls.when user selects the required birth date via the day month and year combo box control, it should validate agains the database and return data on tabs.
Is there a way to show year and month drop down on the calendar extender like the jquery ui calendar, If so could you kindly post it for me. If not would you be willing to show me how to do the jquery ui calender with Start Theme.
I have a requirement that I have to retrieve data base on month and year.I am using the below query
<pre lang="sql">SELECT SUM(areasft),DATEPART(year, sdate),DATEPART(month, sdate) FROM storedata GROUP BY DATEPART(year, sdate) ,DATEPART(month, sdate) ORDER BY DATEPART(year, sDate) ,DATEPART(month, sDate)</pre>
I have,hours(in varchar),Id in table tbl_x ,i need the sum of hours, monthyear(eg. mar 2010)for the last three months.But with two separate queries i am getting these results.but actually i need in the following format
Month/Year TotalHours ----------------- ---------------- Mar 2010 0400 Apr 2010 0450
I am using a drop down lists for selecting the month and year in .aspx page. I have to get last date of the selected month of particular selected year in .aspx.cs page. (some months have 30 days and some have 31 days)
I have asp.net calender control on my form and I have dropdown for month and year. and one button When I select month and year from dropdown and then when i click Button then I want to be able to go the specified month and year on my calender?
I have a standard calendar control and is now showing Nov 2010 calendar on page.
I want it return to label1.text as Nov-2010. Then I want when users click forward arrow and turn Calendar to Dec 2010, I want Dec-2010 be displayed in label1.text. ie not when user click a particular date but when user click Calendar to a particular month the Calendar is showing.
I am getting error Year, Month, and Day parameters describe an un-representable DateTime. While inserting date to sql server.1) First time I was using the DateTime.Now function to insert the date to Database but after getting the error I have changed the date format When the date format is in the form "18/12/2008 12:00:00 AM"Error - The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value "
Assuming I enter into TextBox txtReleaseDate a date in format month/day/year, then upon clicking an Update or Insert button, a CompareValidator control complains that date format is not valid. But if I enter date in format day/month/year, then object data source throws an exception Cannot convert value of parameter 'releaseDate' from 'System.String' to 'System.DateTime', while CompareValidator doesn't complain. I need the two controls to accept the same date format, so:
a) Since my DB stores date in format day/month/year, the best option would be for ODS to also accept this as valid date format. Can ODS be configured that way?
b)Can CompareValidator be configured to also accept month/day/year format?