Format date on x-axis in cfchart
I want to format the date on the x-axis of my cfchart as mm/yyyy as opposed to the full datetime value that is returned from sql server (yyyy-mm-dd hh:mm:ss). How do I do this? ...
I want to format the date on the x-axis of my cfchart as mm/yyyy as opposed to the full datetime value that is returned from sql server (yyyy-mm-dd hh:mm:ss). How do I do this? ...
If in a database (MySQL), I have a datetime column (ex. 1899-12-30 19:00:00), how do I sum 1 day to it? Following http://corelib.rubyonrails.org/classes/Time.html#M000240 If I want to add 1 day, it actually adds 60*60*24 days (86,400 days) r=Record.find(:first) =>Sat, 30 Dec 1899 19:00:00 -0600 r.date + (60*60*24) =>Fri, 20 Jul 2136 1...
trying to parse "06/01/2010 15:00:00 08:00" the problem is the last offset hour, mysql str_to_date can't parse it, any idea? ...
Basically, I want to pull data from August to May for a given set of dates. Using the between operator works as long as I do not cross the year marker (i.e. BETWEEN 8 AND 12 works -- BETWEEN 8 AND 5 does not). Is there any way to pull this data? Here is the SQL Query I wrote: SELECT count(*), MONTH(DateTime) FROM Downloads WHERE YEAR(Da...
I used this code $new_date = date('Y-m-d H:i:s', timetostr($orig_date)); to convert this input Wed Jun 2 2010 to a datetime output 2010-06-02 00:00:00 When I read it from the database, how do I convert it back to the original format of Wed Jun 2 2010? ...
Updated to remove extraneous text and ambiguity. The Rules: An employee accrues 8 hours of Paid Time Off on the day after each quarter. Quarters, specifically being: Jan 1 - Mar 31 Apr 1 - Jun 30 Jul 1 - Sep 30 Oct 1 - Dec 31 The Problem Using python, I need to define the guts of the following function: def acrued_hours_betw...
string strdate="15/06/2010"; DateTime dt = DateTime.Parse(strdate, System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat); i cannot able to get the datetime value as dd/mm/yyyy. it is giving exception 'string is not recognized as a valid datetime' oly if it is in 06/15/2010 it is working. how to get the same...
Hay, i have a field in one of my models which saves the creation date of an object created_on = models.DateTimeField(blank=False, auto_now_add=True) This works as expected. In my templates i want to list objects like this June 15 {{ objects here which was created on June 15 }} June 14 {{ objects here which was created on June 14 }}...
Hello, I have problems comparing the datetime property of objects and when trying to compare to a given date. For example, I tried IQuery query1 = session.CreateQuery(String.Format( @"Select s.Id From InventoryProductStateItem s Where s.ValidFrom = " + stateItem.ValidFrom)); but get an exception...
string queryString = "SELECT SUM(skupaj_kalorij)as Skupaj_Kalorij " + "FROM (obroki_save LEFT JOIN users ON obroki_save.ID_uporabnika=users.ID)" + "WHERE users.ID= " + a.ToString() + " AND obroki_save.datum =?"; using (OleDbCommand cmd = new OleDbCommand(queryString,database)) ...
Hi, how can I set the selected value of a Sharepoint DateTimeControl to null? When you first load it into a page, there's no value selected (even if the returned value is not properly null but one can check it with IsDateEmpty). How can i programmatically set it back to the initial, empty value? Thanks ...
I am getting the date from my MySQL database and that date is correct, but when I use the date() function the minute part is stuck at 6 minutes. MySQL is returning 2010-06-15 09:59:18 Then in PHP I use this code ($row[4] is from my while loop): date('M d,Y H:m A',strtotime($row[4])) When I echo this out I get: Jun 15,2010 9:06 AM I...
I have 2 XML files I'm reading - one has a date/time attribute that's readable (ex. May 1, 2010 12:03:14 AM) and the other... not so much (ex. 1272686594492). Both files have the complicated date/time format, but only the newer one has the readable version. I cannot figure out how to make the complicated version readable. Any ideas? The...
I am currently looking on converting Thu Jun 10 16:17:55 +0530 2010 to 15/06/2010 or 15-06-2010 using Ruby I am getting the dates from the DB as shown below. @tickets = Ticket.find(:all) for ticket in @tickets print ticket.created_at end I have been looking around for resources as I a n00b in RoR/Ruby. I have looked...
Hello :) I'm writing a simple wrapper around the Win32 FILETIME structure. boost::datetime has most of what I want, except I need whatever date type I end up using to interpolate with Windows APIs without issues. To that end, I've decided to write my own things for doing this -- most of the operations aren't all that complicated. I'm i...
Where can I find some examples on how to manipulate the time objects by days/hours/etc? I would like to do this: time.now_by_hour #=> "Tue Jun 15 23 MST 2010" time.now_by_day #=> ""Tue Jun 15 MST 2010" time.now_by_hour - 4.weeks - 3.days #=> "Sat May 15 MST 2010" What is the recommended order of operations? The reason for this is I ...
I currently use the DBIx::Class::InflateColumn::DateTime plugin to inflate my date columns to DateTime objects and deflate my DateTime objects to MySQL date values. I want to store the age of an individual (I cannot use DOB) and for this the years, months or days values may be 0. Therefore I am using a DateTime::Duration object. Thing i...
Given an arbitrary string, for example ("I'm going to play croquet next Friday" or "Gadzooks, is it 17th June already?"), how would you go about extracting the dates from there? If this is looking like a good candidate for the too-hard basket, perhaps you could suggest an alternative. I want to be able to parse Twitter messages for date...
I am trying to figure out a way to calculate the year of birth for records when given the age to two decimals at a given date - in Perl. To illustrate this example consider these two records: date, age at date 25 Nov 2005, 74.23 21 Jan 2007, 75.38 What I want to do is get the year of birth based on those records - it should be, in th...
Say the current date is 1st Mar 2010, I want to display it like this... 20100301 so like first 4 digits = year, 2 digits = Month, 2 digits = day is there an easy way to do this? ...