minutes (1,037)


Calculate relative time in C#

Calculate relative time in C#

Given a specific DateTime value, how do I display relative time, like: 2 hours ago 3 days ago a month ago…


c# - Clearing Page Cache in ASP.NET

For my blog I am wanting to use the Output Cache to save a cached version of a perticular post for around 10 minutes, and thats fine...<%@OutputCache Duration="600" VaryByParam="*" %> However, if some…


php - sleep() silently hogs CPU

I'm running Apache on Linux within VMWare. One of the PHP pages I'm requesting does a sleep(), and I find that if I attempt to request a second page whilst the first page is sleep()'ing, the second…


How do I get the difference between two Dates in JavaScript?

I'm creating an application which lets you define events with a time frame. I want to automatically fill in the end date when the user selects or changes the start date. I can't quite figure out, ho…


Oracle equivalent to SQL Server/Sybase DateDiff

We are now using NHibernate to connect to different database base on where our software is installed. So I am porting many SQL Procedures to Oracle. SQL Server has a nice function called DateDiff wh…



What is the Linux equivalent to DOS pause?

I have a Bash shell script in which I would like to pause execution until the user presses a key. In DOS, this is easily accomplished with the "pause" command. Is there a Linux equivalent I can use in…


What is the standard way to add N seconds to datetime.time in Python?

Given a datetime.time value in Python, is there a standard way to add an integer number of seconds to it, so that 11:34:59+3=11:35:02, for example? These obvious ideas don't work:>>> datetime.tim…


c# - Connection Timeout exception for a query using ADO.Net

Update: Looks like the query does not throw any timeout. The connection is timing out. This is a sample code for executing a query. Sometimes, while executing time consuming queries, it throws a time…


Specifying “all odd values” in crontab?

In crontab, I can use an asterisk to mean every value, or "*/2" to mean every even value. Is there a way to specify every odd value?(Would something like "1+*/2" work?)…


macos - How do I set a task to run every so often?

How do I have a script run every, say 30 minutes? I assume there are different ways for different OSs. I'm using OS X.…




time seconds hours date and how days get datetime every