datetime

Get ten millionths of a second

How do I get the string value of the ten millionths of a second? "fffffff" http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx ...

Adobe Pro, PDF form with javascript

Hello! I have created a form in Adobe Pro and i have added some JavaScript to it. But i have two problems. 1) Is there a "Document Finished Loading"-action? I have a date field on the form and i would like that it automatically adds todays date into that field when the user opens the document to fill in the form fields. 2) The date me...

Python human readable date difference

I have given date strings like these: Mon Jun 28 10:51:07 2010 Fri Jun 18 10:18:43 2010 Wed Dec 15 09:18:43 2010 What is a handy python way to calculate the difference in days? Assuming the time zone is the same. The strings were returned by linux commands. Edit: Thank you, so many good answers ...

SQL Count distinct times with a 30 minute difference

I'm trying to find a SQL query that will count the number of distinct start times that are at least 30 minutes different. I have a number of employees that are paid a credit when they start work on at least three distinct times in a week, where the start time is at least 30 minutes different from the other start times. For example: se...

Convert Unix Timestamp to human format in Django with Python

Hi, I'd like to a convert unix timestamp I have in a string (ex. 1277722499.82) into a more humanized format (hh:mm:ss or similar). Is there an easy way to do this in python for a django app? This is outside of a template, in the model that I would like to do this. Thanks. edit I'm using the python function time.time() to generate the...

Access DB - Multiple Time/Date for one ID

I'm creating a small db for a non-profit where volunteers drive disabled/elderly citizens to different locations around the area. They currently use Excel sheets to update everything manually and want to move to something more streamlined. I have one table of drivers that has all their information, however there is a field that requires ...

MySQL Date, Minutes Add to a value

I cant seem to get this to work, It returns Null SELECT sdt, timeFor, DATE_ADD(TIMESTAMP(sdt), INTERVAL timeFor MINUTE) FROM tbl_day The return keeps returning sdt, timeFor, DATE_ADD(TIMESTAMP(sdt), INTERVAL timeFor MINUTE) '0000-00-00 01:00:00', 15, '' Columns Type sdt DATETIME timeFor BIGINT(20) Any ideas ...

want to compare a strtotime value to currenttime and output: something x min ago

Hi. I am working on a newsfeed like similar to facebook. Where I compare the time when something happened in my mysql table to the current time and output: something something happened x min ago. First i connect to mysql with this code: $conn = db_connect(); $newsfeed = $conn->query("select info, username, time from ...

Date difference includes Timezone offset, what's wrong?

I have this code: Date now = new Date(); // the string is in UTC format, so a UTC date must be constructed, I don't know if that happens in this format Date measure = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(utcDateTime); long diff = now.getTime() - measure.getTime(); if (diff < 1000* 60 * 15) { // measure is less then 15 ...

Windows system time with millisecond precision

Related to my previous question, but with C#, I need the precise system time including milliseconds. C# time function has accuracy up to 10 to 15 milliseconds, but not exactly 1 millisecond. The same is the case with Queue performance counter. Is there any other way to get accuracy up to exact millisecond? ...

How would you format DateTime in international format?

The international string representation format is (YYYY-MM-DD HH:MM:SS ±HHMM). e.g. 2010-06-10 21:21:10 -0400 basically the problem I am having is figuring out how to get the difference from GMT. DateTime dt = new DateTime(2008, 3, 9, 16, 5, 7, 123); String.Format("{0:yyyy-MM-dd HH:mm:ss ????}", dt); ...

Join Date and Time to DateTime in C#

I am retrieving data from an iSeries where there is a separate date and time fields. I want to join them into a DateTime field in my C# project. I don't see a way to add just a time to a DateTime field. How would you suggest accomplishing this? ...

javascript regex iso datetime

does anyone have a good regex pattern for matching iso datetimes? ie: 2010-06-15T00:00:00 ...

Converting UTS (UTC-0) times to BST in PHP or jQuery

I'm pulling the most recent listened tracks from last.fm and putting them on my website. Problem is, the times are retrieved in UTC-0 uts format and appear to be an hour out when comparing them to BST times in order to calculate a fuzzy time stamp ("about 5mins ago", "about an hour ago" etc). Is there any way solve this so the times al...

Getting the date only in Convert.ToDateTime() in asp.net

Hi, I have a parameter string that passes date value to a stored proc cmdItemSearch.Parameters.Add(new SqlParameter("@EndDate", SqlDbType.DateTime)); cmdItemSearch.Parameters["@EndDate"].Value = Convert.ToDateTime(DateTime.Now); The value being passed is "6/30/2010 7:45:00 AM" I want to pass only "6/30/2010" How would I do that? ...

Set textbox text to Today/Tomorrow/Next Day/etc. automatically?

I'm new to programming in VBA, but what I'm trying to do right now is have a PowerPoint slide that updates every day. It's a weather forecast slide that is displayed in our lobby, and currently I manually update the seven day forecast each day I come in. This means that until I come in, it shows the current day as yesterday's date, and t...

Nhibernate Hql query retrieve DateTime empty

Hi I need hql query for retrieving objects with an empty value in a datetime property Something like that from Users u where u.LastLogon is empty LastLogon is a DateTime? property, datetime in the MS Sql Table How can you do that? ...

Date/Time stored as floating point, which algorithm is used?

I'm have access to a 3rd party application's database, and I see a field called "date" which stores date/time values as floating point numbers, but I'm not sure how this floating point number is mapped to a date/time. There is no documentation for this database. Here is some sample data: date-field actual-date-time 253507382.168...

Oracle date time

I have four fields: Start_Date = 16-Jun-10 Start_Time = 14:37 End_Date = 16-Jun-10 End_Time = 14:38 I need to calculate the difference from start to end. I tried using the to_date(Start_date || Start_Time) but keep getting this error message: ORA-01830: date format picture ends before converting entire input string 01830.00000 ...

Calculate the difference between two dates and get the value in years ?

Possible Duplicate: How do I calculate someones age in C#? I want to calculate basically the age of employees - So we have DOB for each employee, So on the C# Side I want to do something like this - int age=Convert.Int32(DateTime.Now-DOB); I can use days and manipulate then get the age...but I wanted to know if there some...