Hi,
I'm writing a sign up form, and I have this:
<?php
for($j = 1; $j <= 12; $j++)
{
$month = date("F", mktime(0, 0, 0, j, 1, 2000));
echo '<option value="'.$month.'">'.$month.'</option>';
}
?>
The problem is that my select box shows 'January' 12 times, but I want January, February, March etc... through December. How can I fi...
I have MMDDYY dates, i.e. today is 111609
How do I convert this to 11/16/2009, in Python?
...
How do you declare a date datatype in a table? Is it simply the following?
CREATE TABLE sampleDB (..., sampledate DATE, ...)
Now, if I want to query from that using a string through a POST form:
<?php
$formdate = $_POST["inputname"];
if($formdate) {
echo "Searching using query: ".$formdate."<br>";
$db = new S...
Hi
I have the following JSON date returned from a MVC page e.g.
"DateProcessed":"\/Date(1258125238090)\/"
and I am using JTemplates to process the data as below.
$('#result').setTemplate($("#TemplateResultsTable").html());
$("#result").processTemplate(data);
This is my results template
<script type="text/html" id="TemplateResults...
Heres the code for converting the json retured date to a string of date.
String.toDate = function(stringDate) {
var newDate = new Date(parseInt(stringDate.replace("/Date(", "").replace(")/", ""), 10));
return newDate;
}
Here are the details:
Date from the database: 2009-11-18 03:23:25.107
Date Returned by JSON: "/Date(1258514605107)...
I have a column, which is datetime type, the value is like this:
2009-10-20 10:00:00
I want to do a select, my query:
SELECT * FROM
data
WHERE datetime = '2009-10-20'
ORDER BY datetime DESC
Should I do this:
SELECT * FROM
data
WHERE datetime BETWEEN('2009-10-20 00:00:00' AND '2009-10-20 23:59:59'
ORDER BY datetime DESC
But i...
I'm new to Seam and I've been searching the internet and the Seam in Action book for this, but I'm looking for way to insert today's date in a seam page (myReport.xhtml or myPdfReport.xhtml)
...
Hi, I just got an answer to my seam question about displaying current date. Now I'm searching around to find the place to change the format for this feature. Is that possible?
Thanks.
...
I have a Java Date that is from this summer during daylight savings time. For example:
Jun 01, 2009 06:00 AM PDT
My question is, how do I display this date as my local time zone and current daylight savings mode (in my case Pacific Standard Time)?
Jun 01, 2009 05:00 AM PST
Java's Date.toString() and SimpleDateFormat displays ...
Is there a free library or class for formatting a date in a pretty way such as "5 minutes ago" or "yesterday"?
I'd be satisfied with the same code in another language that I could port to Actionscript (like Java or C#)
...
I have a DATETIME for an entry in my database that is upcoming. I want to know the difference in time between the the DATETIME and the current date/time in Days, Hours, Minutes, and Seconds. I thought I might be able to use the date function to do this, but perhaps I am wrong.
This was my approach:
$now = mktime(0, 0, 0, date("m"), dat...
What is the best way to get the day of year of an specific date in Ruby?
For example: 31/dec/2009 -> 365, 01/feb/2008 -> 32, etc
...
Hi,
I have the following date object in ruby
Date.new(2009, 11, 19)
How would you find the next friday?
Cheers
...
I have a string containing a local date/time and I need to convert it to a time_t value (in UTC) - I've been trying this:
char* date = "2009/09/01/00";
struct tm cal = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL};
strptime(date, "%Y/%m/%d/%H", &cal);
time_t t = mktime(&cal);
but the time_t value I get back is the value that I would expect if ...
I was try to measure what is faster and what should be the best way to compare two dates, from datetime record in MySql db. There are several approaches how to grab a date from date time, but I was concentrate on two one is to use DATE function and second is to use LEFT function, something like this
DATE(created_on)
, and for LEFT...
I'm trying to convert the string produced from the __DATE__ macro into a time_t. I don't need a full-blown date/time parser, something that only handles the format of the __DATE__ macro would be great.
A preprocessor method would be nifty, but a function would work just as well. If it's relevant, I'm using MSVC.
...
What would be the best way to convert a mysql date format date into a javascript Date object?
mySQL date format is 'YYYY-MM-DD' (ISO Format).
...
I am having trouble trying to figure out how i would display a month without having to display "January" like in my switch - if i try to just oputput it i get a number 1
Do i need to create memory for the date priceDate; private member?
than copy in my copy constructor?
sorry about formatting. i had to move stuff over so it would displ...
Hello all,
I'm trying to work with dates for the first time, I did it something about that with Flash but it's different.
I have two different dates and I'd like to see the difference in hours and days with them, I've found too many examples but not what I'm loking for:
<?php
$now_date = strtotime (date ('Y-m-d H:i:s')); // the cur...
I have a list of values and dates for stock ticker symbols and want to calculate quarterly returns in SQL.
CREATE TABLE `symbol_details` (
`symbol_header_id` INT(11) DEFAULT NULL,
`DATE` DATETIME DEFAULT NULL,
`NAV` DOUBLE DEFAULT NULL,
`ADJ_NAV` DOUBLE DEFAULT NULL)
For fixed quarter start and end dates that works fine:
set...