I'm hoping that someone has found a way of doing this already or that there is a library already in existence. It's one of those things that would be nice but is in no way necessary for the time being.
The functionality I'm looking for is something like datejs in reverse.
Thanks,
Simon.
...
Hi All,
I need to get all the dates present in the date range using SQL Server 2005
...
Some time ago I put together a time based library that could be used for working out relative times within a year for someone. I noted at the time, that it did the one hour shift in both directions for daylight savings. It just occurred to me that Congress changed the daylight savings time rules. I don't recall seeing any information...
SPListItem.GetFormattedValue seems to have a strange behavior for DateTime fields.
It retrieves the DateTime value through SPListItem's indexer which according to this MSDN article returns local time.
Here's a snippet from Reflector
public string GetFormattedValue(string fieldName)
{
SPField field = this.Fields.GetField(fieldName);
...
How do I set the date/time of the computer in C#?
...
How do you convert between a DateTime and a Time object in Ruby?
...
I'm working on a time sheet application, where I'd like the user to be able to enter times in TextBoxes, e.g.: 8 a or 8:00 a or the like, just like you can in Excel.
Now if you enter a date in a TextBox and then use DateTime.TryParse, you can enter it in several formats (Jan 31, 2007; 1/31/2007; 31/1/2007; January 31, 2007; etc.) and .N...
I have a nullable date in my database. I am connecting to it with a LinqDataSource, and binding with a FormView. It allows you to place dates fine, but if you remove the date I need it to insert the null value to the db. It is instead throwing an exception.
<asp:TextBox ID="TxtStartDate" runat="server"
Text='<%# Bin...
How do I convert a DateTime structure to its equivalent RFC 822 date-time formatted string representation and parse this string representation back to a DateTime structure? The RFC-822 date-time format is used in a number of specifications such as the RSS Syndication Format.
...
Given a week-day (1-7), how can I calculate what that week-day's last date was?
Example: Today is Wednesday, 2008/11/12, and I want to know what last Friday's date was.
...
Every time I have to build a form with a DateTime field I try to find a decent free custom control - I always fail.
I cannot figure out why it isn't built in the .NET but let's forget about for a minute and concentrate on my question :D
Anyone got one?
...
Hi all,
I have this routine that calculates the seconds-to-date for a struct tm. On Linux my implementation using mktime works fine, but
mktime on windows VS2003/.NET 1.1 returns -1 for pre-epoch datetimes.
How do I calculate meaningful time_t values (i.e.
value + secondsToEpoch == secondsToDatetime
) from a for pre-epoch dates...
In a previous question about overriding Time.now, I was working toward a solution of faking clock synchronization across all machines connecting to a given database. Overriding Time.now seemed the best way for the approach I was taking, however:
It appears as though I could get the result I was after via a much simpler line. If I can ...
What is the equivalent of Java's System.currentTimeMillis() in C#?
...
What is the best way to store DateTime in SQL for different timezones and different locales
There a few questions/answers about timezones, but none is addressing the locale problems.
DateTime.ToUniversalTime is locale specific, and I need it locale independent.
For example:
DateTime.Now.ToUniversalTime.ToString()
In US locale...
I'm writing a file that requires dates to be in decimal format:
2007-04-24T13:18:09 becomes 39196.554270833331000
Does anyone have a time formatter that will do this (Decimal time is what VB/Office, etc. use)?
Basic code goes like follows:
final DateTime date = new DateTime(2007, 04, 24, 13, 18, 9, 0, DateTimeZone.UTC);
double ...
Recently I was trying to make a calendar application that will display the current year-month-date to the user. The problem is, if the user is gonna keep my application running even for the next day, how do I get notified ?? How shall I change the date displayed ? I don't wanna poll the current date to update it. Is this possible in c#. ...
I'd love to know if there is a module to parse "human formatted" dates in Perl. I mean things like "tomorrow", "Tuesday", "next week", "1 hour ago".
My research with CPAN suggest that there is no such module, so how would you go about creating one? NLP is way over the top for this.
...
This problem occurred during daylight saving time change. After the change occurred, we've noticed that our server application started writing into the log incorrect time - one hour ahead which means that .NET caches time zone offset. We had to restart our application to resolve this problem.
I wrote a simple application to reproduce thi...
C#: How do you get the current time (not date AND time)?
Example: 5:42:12 PM
...