date

SQLite: How to calculate age from birth date

What is the best way to calculate the age in years from a birth date in sqlite3? ...

can I use .to_s(:long) in Postgres with a column type date on Heroku in rails?

I have a column type date (shown from annotate) on my Contacts table: # date_entered :date(255) This is the line of code that has worked for me locally on my sqlite3 database, but now generates an error in Heroku: <%= contact.date_entered.to_s(:long) %> The error that I get is: wrong number of arguments (1 for 0) I remove...

Grails - how to convert the text in an input field into a java date object using a taglib

I am trying to design my own custom set of tags using grails and i am having problems converting my date text into a Date object using the grails taglib. I have only succeeded in rendering already existing dates into a chosen format, but when i try to change the date and save it again, i run into problems ...

Drupal Calendar views display

Hi, I am working on a project which has events calendar. I am using date and calendar module for that. On calendar month page, we can display titles of events on that day. That is simple. But suppose there are 10 events on one day, then that day column becomes too long. So, instead of displaying titles, I want to display no. of events ...

highlight the current week in date_popup drupal

Is there any way to highlight the current week starting from Monday to next Sunday ? Thanks in advance ...

Jquery Plugins - date selector and crud(php mysql)

hi, I am trying to find a date picker that can show dates to select starting current date so that the users don't select the past date and I need not worry about validating. I am not sure if this will show the correct date for any one from any place. I found some plugins but none of it has this option. I found this http://jqueryui.com...

Date to String <-> String to Date

Hello to all! I get a Date of my database and I need to show it as a String. So in Flex I do this: public static function dateToString(cDate:Date):String { return cDate.date.toString()+"."+ cDate.month.toString()+"."+ cDate.fullYear.toString()+" "+ cDate.hours.toString()+":"+ cDat...

want to compare a strtotime value to currenttime and output: something x min ago

Hi. I am working on a newsfeed like similar to facebook. Where I compare the time when something happened in my mysql table to the current time and output: something something happened x min ago. First i connect to mysql with this code: $conn = db_connect(); $newsfeed = $conn->query("select info, username, time from ...

SQL Converting string MMM.YY to date

Hi, how do i convert/cast a column contains strings e.g. Jan.08,Feb.08.. into date format so that i can sort them? Greatest Thanks! ...

Date difference includes Timezone offset, what's wrong?

I have this code: Date now = new Date(); // the string is in UTC format, so a UTC date must be constructed, I don't know if that happens in this format Date measure = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(utcDateTime); long diff = now.getTime() - measure.getTime(); if (diff < 1000* 60 * 15) { // measure is less then 15 ...

Latex insert date setted with \date command

Hi, I searched all morning to do this. I want to insert in my custom title page the date , author , title setted with the following commands \date{The date} \author{Me \and Other} \title{the document title} I want to insert those in my document anywhere (and my custom title page) Solution \makeatletter \@date \@title \makeatother...

How to convert date saved in String format to Date format

Hi, I am trying to convert string to date, but getting error. I am getting date using : URL xmlUrl = new URL(path); URLConnection urlconn = xmlUrl.openConnection(); Date = new Date(urlconn.getLastModified()); and then I ma saving this date in a file , which saves in the following format : Mon Jun 21 16:31:24 Asia/Karachi 2010 a...

Parse non-standard date format like "+0yyyyMMdd"

I Have Date, that comes to our system in format +0yyyyMMdd For instance 12 March,2011 is +020110312 For now it's definitely + symbol and one 0 before Date, but in future it may be more than one zeros,e.g. +000020110312 Is it possible to parse it with standard Java java.text.DateFormat.parse(String source)? Or I should write custom pa...

Find Date Recycle Bin Was Last Emptied

Where on my computer would I be able to find the last date that the recycle bin was last emptied, would such an event be stored in the windows system logs? and if so where? Thanks :) ...

Insert a NULL Date field into a Strongly Typed Dataset without getting a System.InvalidCastException

System.Data.StrongTypingException("The value for column 'CS_REPLY_DATE' in table 'CSAA_STATUS' is DBNull." I am using an Xmldataset .XSD connecting SQL Server 2005 tables, the dates I want to null out upon Initial insertion of a row into the table. The table date field allow nulls. I am using a strongly typed xsd table row and the ...

How to change date's format from milliseconds

Hi, I am receiving last modification date of a file, using below code : xmlUrl = new URL("http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html"); URLConnection urlconn = xmlUrl.openConnection(); urlDate = new Date(urlconn.getLastModified()); In result I am getting date in below format: Tue Dec 18 05:11:33 Asia/Ka...

FIlter directories based on timestamp

Hello everyone, My ultimate goal is the following : delete all content from a directory that is older than a given date. What I'm willing to achieve is removing all backup directories that are more than 7 days old compared to today's date. I could check the directories based on their OS timestamp (Windows 2003) or the directory name wh...

MYSQL: comparing a NULL date to CURRENT_DATE

I have a MYSQL table with news articles with the fields "date_start" and "date_end" to indicate which news to show on a web site. Articles are public if date_start is before today and the date_end hasn't already gone by (after today). The problem: I'd like to let the admin leave date_end NULL if the article is of permanent nature and do...

Using EXSLT to subtract dates

How can I use EXSLT extensions to subtract a date. I see that there is a date-add function, but the EXSLT docs don't include any examples. I am trying to take the current date and subtract 1 month for example. ...

Can you modify the Date Created property on Sharepoint 2010 documents?

I'm working on migrating our company's documents from a generic file server to Sharepoint 2010 and was wondering if there was any way to keep the original Created Date property from the documents so it shows up in Sharepoint with the original Creation date rather than the date it was added to Sharepoint. Is this possible? We're current...