date

Flex: adding 1 day to a specific date

how can i set a date adding 1 day in flex?? ...

Drupal 6: Group multiple values in tpl.php

When using the date and views module, you can specify in views (using row style fields) 'group multiple values'. Which is default on. If you turn it off, you get multiple nodes each with a date. For example: - 24th March ------- node1 - 25th March ------- node1 What I'm trying to figure out is: what if you are not using fields but nod...

mysql querying age from dob

My MySQL database has date of birth stored in the format yyyy-mm-dd, how do I query the database - without using php code - to show me results of people born within x years of now, and/or, who are y years of age? The table is called users, the colum is called dob. I've spent a while viewing the MySQL manual but I can't work out precisel...

MYSQL query to get all entries with specific time, from PHP?

I'm trying to query a mysql table which places its date in the following format: yyyy-mm-dd hh:mm:ss So it's date and time, and that's all in a single field. Now from php I want to get the time and query the table to only return entries where the date field is less than 24 hours old. I'm having issues with the system because PHPs get ...

Convert a mysql date (datetime) into a better date format using php

I some php code which gets info from a mysql database. The problem is that the date is coming out in the format : 2010-02-03 22:21:26 Does anyone know a simple solution to make the date more user friendly format. e.g 2nd march 2010 at 22:21. Thanks ...

get an age from a D.O.B field

I need to calculate the age of a "customer" from their date of birth. have tried to use: DATEDIFF(year,customer.dob,"2010-01-01"); but it doesnt seem to like it. Any ideas, I KNOW its going to be something simple!? Thanks ...

Problems with Runt overlap? but *only* within Rails

Martin Fowler's Runt library is really handy for date/time comparisons, and this code works great in an irb console: require 'runt' include Runt r_start = PDate.month(2010,12) r_end = PDate.month(2011,12) range = DateRange.new(r_start,r_end) o_start = PDate.month(2010,11) o_end = PDate.month(2012,2) o_range = DateRange.new(o_start,o_en...

Difference in Months between two dates in JavaScript

How would I work out the difference for two Date() objects in JavaScript, while only return the number of months in the difference? Any help would be great :) ...

Mayan calendar in Java

How i can use the maya calendar in Java? ...

How do I get date form week, working also with 53-week years? c#

Hey, I have made a function to cound the weeks in a year, and that works fine. The problem is that I need a method to get the mondaydate of the week. This is a swedish calendar. The code below works well for years that have 52 weeks, but some years(like 2009) has 53 weeks. Then I got a date from januari as the mondaydate(cant be right)...

SSRS date default with formula disables parameter

When I set a default value formula for a date parameter in SSRS, such as: =CDate(”01/” & Month(Now) & “/” & Year(Now)) or even: =Now The date parameter control becomes disabled with nothing in it. Anyone know what simple thing (I am sure) I am doing wrong? ...

Why do I get a "Day too big" error from Perl?

I have been helping someone debug some code where the error message was "Day too big". I know that this springs from localtime and the Y2038 bug (most google results appear to be people dealing with cookies expiring well into the future). We appear to have 'fixed' the problem by using time to get the current date. However, given that ...

Date query with Hibernate on Timestamp Column in PostgreSQL

A table has timestamp column. A sample value in that could be 2010-03-30 13:42:42. With Hibernate, I am doing a range query Restrictions.between("column-name", fromDate, toDate). The Hibernate mapping for this column is as follows. <property name="orderTimestamp" column="order_timestamp" type="java.util.Date" /> Let's say, I want to...

Checking if date parsing is correct

Hello, I have this code for checking whether the Date is OK or not, but it's not ckecking all the cases. For example when text="03/13/2009" as this date doesn't exist in the format "dd/MM/yyyy" it parses the date as 03/01/2010. Is there any way to change this behaviour and getting an exception when I try to parse a Date which is not cor...

How to override/control the way the JVM gets the system date?

How do you mock-up/trick the JVM to get a date other that the current system date? I have a set of tests in JUnit I don't want to change, but instead I want to change a setting so that when the JVM retrieves the date it retrieves the date I want. Have you done something similar before? Thanks. ...

DataMapper Dates

Forgive me if this is a simple answer. But how do you get a Date from a DataMapper property. For example: require 'rubygems' require 'sinatra' require 'datamapper' class Test include DataMapper::Resource property :id, Serial property :created_at, Date end get '/:id' do test = Test.get(1) test.created_at = ? end ...

Why does the month argument range from 0 to 11 in JavaScript's Date constructor?

When initializing a new Date object in JavaScript using the below call, I found out that the month argument counts starting from zero. new Date(2010, 3, 1); // that's the 1st April 2010! Why does the month argument start from 0? On the other hand, the day of the month argument (last one) is a number from 1 to 31. Are there good reaso...

check date for variable value

I have a variable in my Java class that needs to be set based on whether today is before or after 7/1. If today is before 7/1 then we are in fiscal year that is the current year (so today we are in FY10). If today is after 7/1 our new fiscal year has started and the variable needs to be the next year (so FY11). psuedo code: if today ...

php date formatting with MySQL SHOW TABLE STATUS

probably missing something simple: <?php $con=mysql_connect('localhost','xxx','xxx'); $db=mysql_select_db('xxx'); $sql = mysql_query("SHOW TABLE STATUS WHERE `name`=\"my_table\""); $foo=mysql_fetch_array($sql); return $foo['Update_time']; // returns 2010-03-31 16:51:06 ?> how do i format this. I tried using date('l jS F Y @ H:i...

Year split in Quarters using basic jQuery

Hi, I have a interesting question: I want to split the year into 4 quarters. What is the idea, A quarter can be different: The HTML Code: <div class="quarterBody"> <span>04-29-2010</span> <span>06-29-2010</span> <span>08-29-2010</span> </div> jQuery (javascript) is total wrong, I hope that w: $(document).ready(...