date

Drupal 6: sorting specific date chronologically...

Hi friends, I'm a drupal newbie... I have created a block with View Module to list events (title, event date) at homepage. dates are being entered into textbox and such format as below; December 5-7, 2010 December 4-6, 2011 July 17-19, 2011 ... When I set Sort Criteria as date, it just mess :/ it doesn't sort chron...

convert to mysql datetime

hello, pls i want to convert this 06-29-2010 04:00PM to this format Y-m-d h:i:s in php thanks ...

Find previous calendar day in python

I have a set of files that I'm saving by date, year_month_day.txt format. I need to open the previous day's text file for some processing. How do I find the previous day's date in python? ...

How do I pass dates as arugments in views in drupal?

I have been trying for awhile now to get the my view to accept a date argument. This is my code: <?php function bookable_views_handlers(){ return array( 'info' => array( 'path' => drupal_get_path('module', 'bookable') . '/includes', ), 'handlers' => array( 'views_handler_field_date' ...

Drupal 6: Date module and displaying only DATE value, without TIME

Hi friends, I'm a newbie drupal guy, I use http://drupal.org/project/date module for my events date, but this module displays TIME as well as default, and I can't turn that off from configuration pages unless I'm a blind :/ is there any way to display only DATE value? Appreciate helps!! thanks a lot! ...

Subtracting dates in PHP

I have timestamps stored in the format YYYY-MM-DD HH:MM:SS (for example 2010-06-21 20:12:56). What would the best way to check how old the timestamp is? For the moment I am mainly interested in the number of days old. ...

Find three previous working days from a given date

Hey, I need to find three previous working days from a given date, omitting weekends and holidays. This isn't a hard task in itself, but it seems that the way I was going to do it would be overly complicated, so I thought I'd ask for your opinion first. To make things more interesting, let's make this a contest. I'm offering 300 as a b...

c++ current date and pointers problems!

in c++ .. first of all I need to make a constructor of class Date d() that creates the current date.. what should i do? after that i have a problem with this program: class Noleggio { public: //Noleggio(unsigned f, unsigned n, unsigned c) : inizio() { film = f; copia = n; cliente = c; restituito = false; } bool restituito;...

Get modified date of web resource in Java

How do you get the modified date of a web resource in Java? URL url = new URL(urlString); URLConnection connection = url.openConnection(); connection.connect(); // What now? ...

date library, capable of calculating things like "every third tuesday"?

I'd like to find a library or command that given input like "every third tuesday" will provide a list of dates such as (2010-06-15, 2010-07-20, 2010-08-17), etc. Something that can be called from python, unix command line, or a web api would be perfect. ...

Windows 7 File Date Question

apologies for not asking a strictly programming question, but this will move on to programming once my confusion is cleared. i am about to write a program that can modify file date stamps like created, modified, last accessed date. as i am investigating on Windows 7, it seems to provide more date fields. exactly how many file attrib...

How to display time countdown using PHP and MySQL

How do I get a time countdown using PHP? I want to display something like 3Days 4Hours. I have a date field coming from MySQL table and want to calculate it with today's date. As of now I have only date and not the time stored in the database, but eventually I will. So at that time, I might show as 3Days 4Hours 10Minutes 43seconds. Th...

forcing 4 digits year in java's simpledateformat

I want to validate and parse dates using a simpleDateFormat with the format "yyyymmdd" This also allows 100624, which is parsed to the year 10 (54 years after Julius Ceasar died). The dates will also be something like 1970, so I don't want to settle with SimpleDateFornat("yymmdd"). I'm wondering is there a way to force a four digit year...

How can I generate a list of pay-period-ending dates in PHP4?

I see that all of the good date/time functions are PHP5 only, which sort of makes this hard. I need to generate a list of all pay-period-ending dates starting with 52 weeks back and going to one pay period in the future, with bi-weekly periods. So, suppose the next pay period ending is June 26, 2010 and today is June 23, 2010, I'd want ...

Selecting entries by date - >= NOW(), MySQL

Hi everyone, I have a Calendar of Events table and I would like to select events with dates equal to or greater than today. When I use the following SELECT statement, it only retrieves events in the future (> NOW()): <?php $db->query("SELECT * FROM events WHERE event_date >= NOW()"); ?> How would I go about selecting all events t...

Chrome, javascript Date and toLocaleString()

Why doesn't Chrome specify AM or PM when displaying a date by using date.toLocaleString() ? The string I get is Fri Jun 25 2010 11:21:09 GMT+1000. While IE returns almost the same string but with AM after the time. Is there any method on the Date object I can call to check whether it's AM or PM and, more importantly, check whether user'...

Wordpress doesn't allow me to post in really old dates (year 1800)

I'm making a timeline in Wordpress, and I'm trying to make a post with the date January 12, 1800, but Wordpress doesn't allow me. Apparently, it doesn't let me post anything before the year 1970. Is there any way to fix it? ...

JavaScript date objects UK dates

I have the following code datePicker.change(function(){ dateSet = datePicker.val(); dateMinimum = dateChange(); dateSetD = new Date(dateSet); dateMinimumD = new Date(dateMinimum); if(dateSetD<dateMinimumD){ datePicker.val(dateMinimum); alert('You can not amend down due dat...

Groovy/Grails: How do I make my datePicker blank or null by default instead of showing today's date?

That is basically my question. It is showing me today's date and not a blank or null or '' date, even if I put null or '' it runs perfectly but keeps showing me today's date, not a blank dropdown box. So I want to change the default to being blank when the gsp loads, not with today's date. Thanks -Fernando ...

Why does this cause an ArithmeticException in C# when SQLPlus is all ok

I have a view connecting 4 tables CREATE VIEW BookCopyInfo AS SELECT bc.BookCopyID, b.BookTitle, m.FirstName || ' ' || m.LastName AS BorrowedBy, l.expectedReturnDate, (SYSDATE - l.expectedReturnDate) AS NoOfDaysLate FROM Book b, Member m, Lending l, BookCopy bc WHERE b.BookID = bc.BookID AND l.MemberID = m.MemberID AND l.BookCopy...