dates

How to key in and display date with hours and minutes into Oracle SQL Developer

I'm using Oracle SQL Developer. I'd like to key in dates with hours and minutes, but the GUI doesn't appear to allow that. While I'm at it, it would be nice to display all date fields as 'YYYY-MM-DD HH24:MI:SS' within the Oracle SQL Developer GUI as well. Thanks! ...

NSPredicateEditorRowTemplate for date comparison

I'm building an NSPredicateEditor, and I want the ability to do advanced date comparison. I realize that I can build an NSPredicateEditorRowTemplate with a rightExpressionType of NSDateAttributeType, but the predicates I want to build need to be much more advanced than that. For example, I need to basic comparison like: dateKeypath <...

How to calculate "time until" a certain date using PHP and the Zend Framework?

I have two Zend Date objects to work with: $now = Zend_Date::now(); $sessionStart = new Zend_Date('2010-04-01 10:00:00', 'yyyy-MM-dd HH:mm:ss'); I need to calculate the time remaining and display in a human readable manner. The session will begin in 7 days. The session will begin in 30 minutes. How can I do this with PHP and the Ze...

Evaluating points in time by months, but without referencing years in Rails

FYI, There is some overlap in the initial description of this question with a question I asked yesterday, but the question is different. My app has users who have seasonal products. When a user selects a product, we allow him to also select the product's season. We accomplish this by letting him select a start date and an end date for...

jQuery FullCalendar JSON date issue

I am integrating jQuery plugin FullCalendar, overall it has been really straightforward. I however have ran into a problem with adding events to the calendar. I am using ASP.NET MVC 1.0 and have found and followed this post. I am returning JSON to the FullCalendar and the events are getting bound, but they all show up as all day events....

How can I work with dates before 1900 in PHP?

I am using PHP and jQuery to build an interactive timeline which needs to display dates between 1500 and 2020. I usually use PHP's strtotime function when working with dates, but it does not work for dates pre-1900. The dates will come from a MySQL database, and are formatted as strings such as "January 31, 1654" (this may not be the id...

How do I get the business days in a week with PHP given the range and current week as params?

Hi, how do I compute the business days in a week given the parameters: start date, end date and current week? The duration of the range for the start date and end date may go over a year. edit: thanks for the welcome! business days are from mon-fri. ...

SQL to return dates that fall in period and range

Hey stackers, I’ve been grinding my head on this for a while… My goal is to return all dates that fall between a start and end date and have a certain period as a factor, from the start date. (hard to explain) For example… Start Date: Nov 20, 1987; End Date: Jan 01, 1988; Period: 10 days; I want these dates: Nov 20, 1987; Nov 30, 19...

Using jQuery to find and then reformat a date string

Hello, I currently am displaying dates as follows "yyyy/mm/dd" in a wordpress blog (it needs to be input in this format because a plugin is using it to define a post expiration date). I want to use jQuery to locate all of these strings on a page (they're all in table cells) and reformat them to "mm.dd.yy" The site is: http://www.beat...

Disable Days in Jquery FullCalendar

I'm using FullCalendar as a large date picker with added features, and need to disable all Sundays and various other days throughout the year. Jquery UI date picker allows you to create methods for disabling dates. Is there a similar setup for FullCalendar? ...

Search for a date between given ranges - Lotus

I have been trying to work out what is the best way to search for gather all of the documents in a database that have a certain date. Originally I was trying to use FTsearch or search to move through a document collection, but I changed over to processing a view and associated documents. My first question is what is the easiest way to ...

Want to improve my simple site/db backup script with auto removal of old backups.

I have the following simple script for backing up my website files and db. The script is run each day via a cron job. #!/bin/sh NOW=$(date +"%Y-%m-%d") mysqldump --opt -h localhost -u username -p'password' dbname > /path/to/folder/backup/db-backup-$NOW.sql gzip -f /path/to/folder/backup/db-backup-$NOW.sql tar czf /path/to/folder/bac...

Format Django DateField as ISO format

Hi, I'm using Django to serve up some XML. Part of the requirements is that my dates are formatted as follows: 1969-12-31T18:33:28-06:00 How can I output a DateField in Django in that format? ...

Separating date ranges into separate segments in SQL

I have a table containing 2 date fields and an identifier (id, fromdate and todate) These dates overlap in any and every possible way. I need to produce a list of segments each with a start and end date describing the separate segments in that list. For example: id, FromDate ToDate 1, 1944-12-11, 1944-12-31 2, 1945-01-01, 1945-...

fullCalendar json with php in "agendaWeek"

<link rel='stylesheet' type='text/css' href='fullcalendar/redmond/theme.css' /> <link rel='stylesheet' type='text/css' href='fullcalendar/fullcalendar.css' /> <script type='text/javascript' src='fullcalendar/jquery/jquery.js'></script> <script type='text/javascript' src='fullcalendar/jquery/ui.core.js'></script> <script type='text/javasc...

Problem with date_select when using :discard option. (Rails)

I'm using a date_select with the option :discard_year => true If a user selects a date in the date select, and then he comes back and returns the select to the prompt values of Month and Day, Rails automatically sets the select values to January 1. I know this is the intended functionality if a month is selected and a day is left bla...

dateByAddingComponents problem and getting difference of dates with NSDateComponents problem!

I am having problems with adding values to dates and also getting differences between dates. The dates and components calculated are incorrect. So for adding, if I add 1.5 months, I only get 1 month, however if I add any whole number ie (1 or 2 or 3 and etc) it calculates correctly. Float32 addAmount = 1.5; NSDateComponents *component...

In VB, calculating the 5th working day of every month

In VB, what coding could I use to calculate the 5th working day of every month? And if the 5th day is a holiday to go up one day. ...

Trying to find the previous six days given any date...

I'm using strtotime just fine for finding the previous week and next week's entries in my database, but what I can't seem to find is how to find the previous six days if the user selects a past date. Here's how I know what today and six days previous are: $today = date("Y-m-d"); $minus6 = date('Y-m-d', strtotime('-6 days')); Now how ...

jQuery: How can I work with dates in this format? mm/yyyy

I'm doing a web application for articles Articles must be shown by month, with its published date stored as mm/yyyy Now: 1- Should I use a DATE type field for storing? 2- Will jQuery UI datePicker be useful for showing mm/yyyy? 3- How could I sort by mm/yyyy? I guess it will be more complicated if I store date normally and extract the...