dates

Why aren't my MySQL Group By Hours vs Half Hours files Not displaying same data?

I need to be able to display data that I have in 15 minute increments in different display types. I have two queries that are giving me trouble. One shows data by half an hour, the other shows data by hour. The only issue is that the data totals change between queries. It's not counting the data that happens between the time frames,...

Comparing two date ranges within the same table

I have a table with sales per store as follows: SQL> select * from sales; ID ID_STORE DATE TOTAL ---------- -------- ---------- ------------------------------- 1 1 2010-01-01 500.00 2 1 2010-01-02 185.00 3 1 2010-01-03 135.00 4 1 2009-01-01 165.00...

Is there a way to find the weeknumber within the year using PHP?

Is there a way to find the weeknumber within the year using PHP? ...

Date format that is guaranteed to be recognized by Excel

Hello, We're exporting our analytics reports in various formats, among them CSV. For some clients this CSV finds it's way into Excel. Inside the CSV file one of the columns is a Date, for example "Start Date","Name" "07-04-2010", "Maxim" Excel has trouble parsing this date format, obviously depending on the Locale of the user. Is "...

The Best Way to Parse Dates from an Email

Im currently developing an app that can parse dates from an email - i.e extract the time and dates from an email (similar to gmail). Currently I do this in php but this is a tad clunky. Whats the best language to do this in and are there any existing open source solutions? ...

A drop down with a list of week beginings vb6

So I have a drop down box in my vb6 form, I was wondering if there was an easy way to have it display the dates for the week begining for the next 4 weeks. e.g. if it was running now it would have 19/4/2009 26/4/2009 3/5/2009 10/5/2009 ...

Change content based on season with ColdFusion

For ColdFusion I would like to use a cfswitch statement to have different code for each season of the year. For example to display <p>Winter</p> for winter and <p>Summer</p> for summer, etc. What is the best approach to achieve this? ...

How to compare the year with the current year in iphone?

I am new to iphone development.I am parsing a XML URL and display the title ,date and summary in a table view.I noticed some of the date were very old like "Wed, 31 Dec 1969 19:00:00 -0500" ,So i don't want to display the dates which are 1 year older than the current year.How to do that? I used the sample code from this site for parsing ...

Find date difference in php?

Is there anyway to find the date difference in php? I have the input of from date 2003-10-17 and todate 2004-03-24. I need the results how many days is there within these two days. Say if 224 days, i need the output in days only. I find the solution through mysql but i need in php. Anyone help me, Thanks in advance. ...

how to get a list of dates between two dates in java

I want to get a list of dates between start and end date.If i give the start and end date means, it give the result as the list of all dates including the start and end date. Thanks in advance. ...

calculating offer period for subscription

I'm maintaining a web application which deals with some kind of subscriptions. Users can to renew their subscriptions from 2 months before expiry (not earlier than that). Sometimes user does not renew before expiry and get grace period which is of 3 months. Now he can renew in these 3 months of grace period. Now the problem part. In th...

Javascript Pointers question with Dates

I noticed this situation in my code (unfortunately), and was able to duplicate it in my own JS file. So I have this code: var date1 = new Date(); // today var date2 = date1; date2 = date2.setDate(date2.getDate() + 1); // what is date1? After this code executes, date1 is today's date + 1! This harkens back to my undergrad days when I...

Most simple way to do holiday calculation?

I want to make a little free calendar program to help me and others calculate how much time we have got left in a project. I mean real working time, not just time. Time in a raw form is not saying much. Typically when my boss tells me that I have time until 05-05-2011 it doesn't tell me really how much time I have to do my job. You kno...

Get data between two date on MySQL

Hello, How can I get the values between two dates. I want to get the values between 2010-01-02 and 2010-01-04. Example: Value DateTime A 2010-01-01 14:55:12 B 2010-01-02 14:55:12 C 2010-01-03 14:55:12 D 2010-01-04 14:55:12 E 2010-01-05 14:55:12 Thanks! ...

Delphi and Outlook TaskItem: How to know if DueDate is empty?

This seems like a no-brainer but I couldn't find anything on it. How do I detect if a date variant in Outlook is "empty"? For example TaskItem.DueDate - the duedate is not necessarily filled. If it's not filled Outlook returns "4501.01.01." - I can test for this value, but this just doesn't seem "elegant" enough. Thanks! ...

How do I use .find for the last five days in ruby on rails?

Have a model called contact_email.date_sent I want to be able to run a report which displays all those where the date_sent range is between date.today and date.today 5 days ago. I assume I use something like @send_emails = Contact_Email.find(:conditions=> ???) But not clear what exactly is the best way. Thanks! ...

R dates "origin" must be supplied

axis.Date(1,sites$date, origin="1960-10-01") Error in as.Date.numeric(x) : 'origin' must be supplied Why is it asking me for the origin when I supplied it in the above code? ...

Finding 'free' times in MySQL

Hi, I've got a table as follows: mysql> DESCRIBE student_lectures; +------------------+----------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +------------------+----------+------+-----+---------+----------------+ | id | int(11) | NO | PRI | NULL |...

How to subtract dates in YYYYMMDD format?

I have 2 integer fields that represent dates in the YYYYMMDD format. What is the best way to subtract 2 of these fields to get the correct # of days between them? For instance, if I take the difference between 20100511 and 20100428 I would like the result to be 13 and not 83. I know I need to convert the integer fields into date forma...

How to handle dates that repeat indefinitely

I am implementing a fairly simple calendar on a website using PHP and MySQL. I want to be able to handle dates that repeat indefinitely and am not sure of the best way to do it. For a time limited repeating event it seems to make sense to just add each event within the timeframe into my db table and group them with some form of recursi...