I am pulling a datetime from a mysql db and i would like to add X hours to it then compare it to the current time. So far i got
$dateNow = strtotime(date('Y-m-d H:i:s'));
$dbTime = strtotime($row[0]);
then i tried $dbTime + strtotime("4 hours"); but 4 hours seem to add 4hrs to the current time instead of raw 4hours. How do i add X ho...
Im pulling data from a MySql data table. I'm pulling from a row called 'PubDate' (meaning Published date). This format is in Date format, not DateTime. When I execute the query
Select * from Articles order by pubDate ASC
Its ordered by date as so:
1.09/18/09
2.09/18/09
3.09/19/09
4.09/20/09
If possible I would like to be able to...
How to get the datetime value several days/weeks/months/years later in MySQL?
I just know the current datetime is NOW() .
...
I created a wrapper to jExcelApi classes to easily export lists of objects to Excel. To minimize object creation cell formats are created as static fields and reused in consecutive calls to export. But I have problems with Date format - the first call works good, but in all consecutive exports date cells have numeric format instead of da...
I have high precision dates stored in an SQL server, e.g.
2009-09-15 19:43:43.910
However when I convert that value into a DateTime the miliseconds value of the resulting DateTime value is 0:
reader["Timestamp"] = 15/09/2009 19:43:43.000
Having these DateTime values in precision down to milliseconds is very important to me - what i...
The custom date strings in .NET allow you to parse a date with seven fractional parts of a second using fffffff I need to parse data exported from Oracle SQL Developer which looks like:
15-OCT-08 15.36.16.280000000
I count nine fractional parts but fffffffff is not a valid date format. In fact:
? DateTime.Now.ToString("dd-MMM-yy H...
I have a Stored Procedure that loops through the months in the fiscal year and does a count for the items in each month. I know for a fact there are 176 items, but when I run this it returns a total count of 182. I tried removing one second from @EndDate, but then my total count was 165. So I'm either counting items twice, or not coun...
I am working on a Rails app that displays a sports schedule (in a basic table). Each game/event is a db table row. The customer wants all the events to display in chronological order but to also display the time in the event's local timezone.
How can I add a timezone selector to the New action? So that when the customer enters events...
I'm new to Python, and confused by the date/time documentation. I want to compute the time that it takes to perform a computation.
In java, I would write:
long timeBefore = System.currentTimeMillis();
doStuff();
long timeAfter = System.currentTimeMillis();
elapsed time = timeAfter - timeBefore;
I'm sure it's even easier in Python. C...
I believe that datetime_select is black magic. What I'm really trying to figure out is the whole 1i,2i,3i,4i... multiple parameters stuff. Specifically how is it handled in the back end (activerecord, something else?). What's with the 'i' after the order-number? Is it a type-specifier? If so what are other types that are available? I...
I want to save a Date object to a readable string (for example 22/10/2009 21:13:14) that is also parsable back to a Date object.
I have tried many things and the best I could find was to use DateFormater for parsing and formating but it has a setback. When you format a date you lose seconds information. I tried to find if there is an op...
I have a Linq query that basically counts how many entries were created on a particular day, which is done by grouping by year, month, day. The problem is that because some days won't have any entries I need to back fill those missing "calendar days" with an entry of 0 count.
My guess is that this can probably be done with a Union or so...
My query is this. I have a bunch of entries and i want to group them by date. But instead of having date in my database, I have a datetime field. What do I do?
select * from follow_queue group by follow_date cast follow_date as date
That's not working.
Thanks!
...
Hi All,
Thanks for reading.
I know what AM/PM stand for (ante-meridiem and post-meridiem), but what are they called?
For example, if I am building a date/time from some fields, such as date, hour, minute, am/pm, and want the user to be able to select the time from some select menus like 1-12, 00-60, and am/pm, I would name the selects...
Hi guys,
is there any good free/open source time picker control that goes well with ASP.NET Calendar control ?
thanks in advance
...
Can SAS store and use datetimes that contain fractions of less than 1/10th of a second?
eg:
data _null_;
input @1 from_dt:datetime22.;
put from_dt= ;
cards;
24Sep2009:11:21:19.856
;
run;
...
I want to be able to change the base millisecond reference from 1970 to 2008 in java so
that I can save space in the database and unique Ids.
Preferably with Joda-Time.
The upcoming jsr-310 in the supposed java 7 release implements it.
In the The Discrete Timeline section of this link it states that the counting of milliseconds has ch...
Is there an easy way to parse HTTP date-strings in Python? According to the standard, there are several ways to format HTTP date strings; the method should be able to handle this.
In other words, I want to convert a string like "Wed, 23 Sep 2009 22:15:29 GMT" to a python time-structure.
...
Is there an elegant way to be permissive in date input in C# to accommodate user input like '2009-09-31' (e.g. September 31, which doesn't exist and causes DateTime.Parse to choke)? Ideally I would like to parse this as October 1 (e.g. latest possible date plus overflow).
...
Hi, I have a bit of a strange problem.
I'd like to be able to measure a timespan independently of the system datetime.
We basically have a system with one central server and multiple local servers which are constantly synchronising with the central server.
Objects on the central server are only valid for a specified time period, e.g....