I have a WMI query that specifies time in this format '20090219000000.000000+480'
Can someone tell me what format this is, and does .NET have any built-in functionality to work with it?
EDIT
This time value is from a sample query that I found. I don't know what time value was used to generate it. I just need to be able to convert a ti...
i am devloping a quiz site and there is time for x min to answer the quiz. So when user clicks on start quiz link the starttime(current time at this instant )is recored in session .Also the endtime (start_time+ 30 min ) is recored in session
and every time he submits a answer the current time is compared with the quiz end time.
Only if ...
Hey
I'm using a regular expression to check the format of a supplied date in my ASP.NET MVC exception. However, every time I run it the action the web server crashes and Visual Studio reports and unhandled System.StackOverflowException
//If the supplied date does not match the format yyyy-mm-dd
//Regex taken from www.regexlib.com
if(!...
Hi,
What is the right way to convert a naive time and a tzinfo into an utc time?
Say I have:
d = datetime(2009, 8, 31, 22, 30, 30)
tz = timezone('US/Pacific')
First way, pytz inspired:
d_tz = tz.normalize(tz.localize(d))
utc = pytz.timezone('UTC')
d_utc = d_tz.astimezone(utc)
Second way, from UTCDateTimeField
def utc_from_localt...
I have an RSS of an events feed. I would like to hide previous events.
Assuming XML data subset of
<Navigation Name="ItemList" Type="Children">
<Page ID="x32444" URL="..." Title="Class..."
EventStartDate="20090831T23:00:00" EventEndDate="20090904T23:00:00"
EventStartTime="20090830T15:30:00" EventEndTime="20090830T18:30:00" Changed=...
hello, every one
i'm using ms sql server 2005 and i need to store date values partially
for example, the day part of a date may stay unknown in fact but mssql constrains to specify the full date like the follow:
INSERT foo(dt) VALUES('2001-10-31');
though i would like to use something like this:
INSERT foo(dt) VALUES ('2001-10-??');...
I want to find out the time in unix time (ie seconds since the unix epoch) on 9:00 BST on 1st October 2009. How can I do this on the linux command line?
I know you can use date @$UNIXTIME '+%someformat', but the unix time is what I'm trying to figure out
...
I've been debugging this problem for the last couple of hours with no success and figured I'd throw it out to SO and see where that goes.
I'm developing a Java program that persists data into a MySql database using Hibernate and the DAO/DTO pattern. In my database, I have a memberprofile table with a firstLoginDate column. In the databa...
Hi
I have a table with 5 million records of dates stored as char(10) with format yyyy/mm/dd. I need to convert these to datetime, so I use:
UPDATE [Database].[dbo].[Table]
SET [DoB]=convert(datetime,[DoBText],103)
GO
But I get the error:
"The conversion of a varchar data type to a datetime data type resulted in an out-of-range...
hello,
In my application users should be able to define dates when they are available. Ie. user joe may define he's available:
- at every monday, wednesday and sunday between 15:00 and 17:00 from 1.09.2009 to 15.11.2009.
- at 2.09.2009 between 12:00 and 14:00
and so on...
Dates may be defined maximum 1 year in future.
Users may add, e...
ASP.NET JSON serialize DateTime to the following format "\/Date(1251877601000)\/". Pls, help parse this string into the java(GWT) Date object.
At this time the solution I came with is parsing with regex, extract long.. but then I cannot push long through JSNI.
...
Hello all,
I am using c#.net. Thanks in advance for any help.
I am using a Repeater and a ObjectDataSource. I use LINQ to connect to the database. This requires a parameter to be passed through (used within the WHERE clause)
public IQueryable<comments> GetComments(DateTime todaysDate)
{
return (from c in dc.comments
...
Hi,
I have a string that looks like this: "9/1/2009". I want to convert it to a DateTime object (using C#).
This works:
DateTime.Parse("9/1/2009", new CultureInfo("en-US"));
But I don't understand why this doesn't work:
DateTime.ParseExact("9/1/2009", "M/d/yyyy", null);
There's no word in the date (like "September"), and I know t...
Hello, I was playing with the DateTime object in PHP 5.3 on my local machine and made something useful but my host (NFS) is only running 5.2 and doesn't plan to upgrade until 5.3.1 is out.
So my question is, is this code possible using 5.2?
Specifically, DateTime::getTimestamp doesn't exist in 5.2
The nicetime.php include is similar t...
How might I get the current time in milliseconds in C? I am doing following to get the time in seconds:
struct tm ptm;
now = time(NULL);
localtime_r(&now,ptm);
myTime= (ptm->tm_hour * 3600) + (ptm->tm_min * 60) + (ptm->tm_sec);
Looking at time.h, struct tm does not have the millisecond member in it.
...
Hi,
I have an array with times (string) e.g "2:23", "3:2:22" etc.
$times = array("2:33", "4:2:22", "3:22") //loner
I want to find the total sum of all array.
Is there a way that I could add times like "2:33" and "3:33" ("i:s")
thanks
...
I want to detect the regional settings changes and show the dates in the correct format in a WPF application. But there is a strange problem with CultureInfo.ClearCachedData. It randomly either works either not. Does anybody know why, and a workaround for this ? I know that the regional settings are stored in the registry, but it's too p...
I've an excel spreadsheet with a column which has the date and time of a particular event. I would like to round this to the nearest 15 minute interval so that I can count the total number of events in this period. What is the best way to do do the rounding?
...
Short of recursing and comparing dates of files/directories, is there a better way of getting a list of all files and directories that have been changed on an NTFS drive since a particular date?
...
I got a binary file, and one of record field stored some date infomation.
The save program is written by VC++ and using the DATE type.
How can read it into C#'s DateTime type ?
...