I want to calculate the number of days an employee has taken leave in the month of january.For that I have two date fields Leave_Start_Date and Leave_End_Date in the database as follows:
I'm trying to calculate the yrs, months, days, hours, mins, seconds between two dates with sql server or c# (ive just used sql more).
I have some code below that I started, but I get some negative values for months, values over 31 for months, and there very well could be more issues. Honestly my math is not the greatest and Im just not sure how to fix it. I want the user to be able to enter their birthday and for it to calculate the yrs, months, days, hours, mins, and seconds they have been alive.
i have a text box named txts_date where the date format is dd/mm/yyyy....and i have a label name lblduration...now my need is i have another text box named lble_date...i want to add the value of duration ie lblduration to txts_date and display it into txte_date...
for example...
txts_date has date 22/11/2010 and lblduration has text as 10 so i want to add both the values so the result would be 02/12//2010..
This may not be correct place to rise this question. Even i'm making here..
My requirement is to get the number of days from from date to end date (for Eg. I have to text boxes from date and to date i will send datetime value to my Stored porcedure i need to calculate no of days between these dates (i.e. no of wroking days) Is there any function to achieve this in SQL SERVER 2005)
I want to redirect the user after 2 mins if there is inactivity for 2 mins. I am not using ASP.NEt membership. And I dont want to use Sessiontimeout for this. Session timeout will logout the user even if he is working on the system. My objective is like screensaver process.
If there is no action for the specified time, the screensaver runs. Similarly, I want to redirect the user to login page.
note that i have already handled it with the following javascript:
[Code]....
Here what my problem is,
the user is working on the site...ok.. he want to see someother site.he browse someother site and works on....or even he can do some other work in his system...but he is active in his system... What this script does is, it automatically logout the user and redirect him to login page. But it should not do while he is active...IT SHOULD REDIRECT IF HE IS NOT ACTIVE REALLY (Similar to Screensaver process)
to create an image from some data in my database on the server every 5 minutes. The image path is Images/top5.jpg, so that users can place a link to that imagine on some forum or whatever and it will update every 5 minutes.I am doing this by using a
System.Threading.Timer in Global.asax: vb.net Code: Public Class Global_asax Inherits System.Web.HttpApplication Dim path As String Dim timer As System.Threading.Timer Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs) [code]...
I have inherited a stored procedure that is taking a very long time to run. I need to optimise this as it feeds a web service and a wait time of over half an hour is somewhat not good.
[Code]....
I have not includes all 1000 sub-accounts just to save a little space here.
The constraints on the table variables are my doing as I was seeing if applying such primary keys / indexes would help matters, but they haven't so far.
is there a way in c# to be able to ping a url every 15 minutes and get a response back from the server?
i want to try to see if .net can be used to build a simple tool to have asp.net websites invoke a re-build so that the first user doesn't incur the load penalty when the application is started.
So we have three 2008 R2 Servers where two are configured to be web servers (IIS 7.5), and the third a session state server. I have set the SessionState and MachineKey settings in the applications web.config. After I restart the two web servers I can log into one server, then change the IP address to the other server, and I am still logged in. Success.
I can typically log in/out with any user account I want, change the ip address back and forth, and all is well until some random time between 30-60 minutes when I log in to one server, change the IP address, and the new server asks for credentials.
This is the sessionState setting in both web.configs:
The application resides under the default web site, and uses the default application pool. I am using forms authentication with a timeout of 20 minutes. I am not receiving any error events on any of the three servers when this happens, and restarting the two web servers fixes the problem for a while. The two web servers are not clustered per-se, but will be served round-robin via a network device.
I have contact mails large than 700.000 Mails and i want to insert them in sqlserver using c# in a few minutes not hours i know that pre impossible but , i know there`s way to do it
I need some pointers to start on this.We are building a time off application where three instances of a calendar control will be displayed ( prev - current and next month) now users can click on various dates accross all three instances and then a count of number of days should be diaplyed in the parent textbox.
To begin with this, i started with adding the dates clicked by the user in Calendar2_SelectionChanged method into a list<> so that i can get the all dates user clicked and then add it to calander's selected dates collection. But this throws an e" object reference not set" error.
Is there anyother way to get all the dates that user click onthe calendar( note the dates doesn't get highlighed so seleteddates doesnt work)does anyone has a good example for this.
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
once a user select an item from dropdownlist > Dates from DB are shown on calendar in pink color.
The problem now is when i want to select new dates the selected dates(in pink) become deselected .. I want them to stay selected so i can know which dates are already used .
i have to date say in MM/DD/YYYY format "1/1/2010" and 1/30/2010". now i want to find dates which comes on monday. so out out will be 01/04/2010, 1/11/2010, 01/18/2010, 01/25/2010