I need to enter the start date, start time, end date and end time in my asp.net MVC application. date fields are textbox and time fields are dropdown.
How can i fill the time dropdowns using jquery.?
Also i need to restrict the user to select the invalid time periods. For ex.: when the user selects 9:00 AM in start time dropdown, the ...
I'm looking for a way to set the month of Zend_Date using a string from the user (could be Jan, January, etc). For example
$month = strftime("%m", strtotime($month));
$date->set($month, Zend_Date::MONTH);
Will get the month 'number', which then can be used to set the Zend_Date month. Is there a way to do that all with Zend_Date?
...
Is there a way in fluent nhibernate to map a DateTime to rehydrate my entity with DateTime.Kind set to Utc rather than unspecified? I'm currently persisting a DateTime that is Utc, but the Kind coming back is always Unspecified, throwing off my time.
...
I have the string "9:00 AM". I would like to get the offset from midnight as a TimeSpan in C#?
...
If we have a timer that starts from lets say CURRENT_TIMESTAMP - 1 Hour we can simply calculate the difference and return 3600 seconds have passed.
But what if we want the timer to only count during certian times of the day and only lets say work during weekday or specified days. Look at the below code to see the Create statment to get...
Hi guys!
Going to need your help on this one.
I'm trying to OrderBy first reply datetime if present. If it's empty/null, it must order by topic datetime. I've ended up with the following expression, but it just doesn't seem to work :(
return db.Topics
.Where(t => t.ForumID == id)
.OrderBy(
t => t.Replies
.OrderBy(r => r.AddDat...
Hello,
I'm performing an HttpWebRequest against an IIS server.
One of the response headers is Date, which I'd like to parse.
This is its value:
"Sun, 11 Oct 2009 08:16:13 GMT"
How do I parase this string? DateTime.Parse didn't quite work out well for me.
Thanks!
...
Python: I need to show file modification times in "1 day ago", "two hours ago", format.
Is there something ready to do that? It should be in english
...
I get a json date from a webservice that i need to parse manualy and the date looks like this:
"Fri, 06 Nov 2009 00:00:00 -0800"
How would i parse this into a datetime object?
I guess i should use DateTime.ParseExact but what do i feed into it.
...
Hi,
i have a file, 'date.txt' which has date in it. Like,
Mon Oct 13 09:37:08 2009.
Now i want to compare this date with system date. How can i compare dates in C++.?
I used this code to get the contents from the file 'date.txt'
string date;
while ( inDateFile >>date) //inDateFile is an ifstream object
cout<<date<<...
I'm trying to parse the time stamps written in some xml files. Most to the time time stamps are something like 2009-07-22-07:00 but some times I find them something like 2009-07-22Z or 2009-07-22z. Kindly help me how to interpret these Zs and how to parse them. I thing these z or Z is related to the time zone. Any workarounds to parse th...
this might be stupid question, but ill ask anyway.
do i really need to implement gmt on site to get proper timestamp on a post? well im building a site like twitter. my feeds are working fine and showing me the time i need, like it shows "posted 11 minutes, posted yesterday, posted 5 days ago.. " just like this site, so i was thinking ...
I have a weird problem, I need to parse a date string that looks like 1997-02-14T00:00:00.0000000+05:30. The odd thing about the date string is the time zone information. It's +05:30 instead of the usual +0530.
I have the basic format string ready, yyyy-MM-dd'T'HH:mm:ss.SSSSSSSZ which would have worked like a charm, if not for the TZ in...
I have never used Informix before and I'm trying to write a query that will return records over the last 365 days.
Here is the query I have been trying to use:
Select * from Visit where vis_mod_dt between today-365 and today;
That returns no records even though I know that there is data for the last 365 days. I am guessing that the ...
I have data formatted "2009-07-17T00:00:00-05:00" in varchar variable. How can I convert this data to datetime field in MS SQL server using query or TSQL?
...
A colleague and I are going back and forth on this issue and I'm hoping to get some outside opinions as to whether or not my proposed solution is a good idea.
First, a disclaimer: I realize that the notion of "optimizing DateTime.Now" sounds crazy to some of you. I have a couple of pre-emptive defenses:
I sometimes suspect that those ...
I've been reading up on how to do this all morning, and the general consensus is this: store your timestamps in UTC and calculate the offset from there.
However, like most people, I am maintaining an existing codebase and I can't change the way we store our dates. At least, not in the allotted time frame.
So my question is, can I safel...
Can someone explain where the highest precision numbers in variables d4 to d7 came from?
The SAS program:
data foo;
format d1-d7 datetime30.6;
timestring = "23:59:59.997000000";
time = input(timestring,time18.);
d1 = dhms(0,0,0,time);
d2 = dhms('08DEC1981'd,0,0,time);
d3 = dhms('31DEC2503'd,0,0,tim...
I have a form where users input information for a test run on a particular date. This creates a table that i then link with another table based on the date and an ID. In this other table (filled by a form created by someone else) all of the times are 7:00 AM. Whoever created the form for that table did what I'm now asking about; since...
Is there an easy way to determine if a year is a leap year?
...