I'm working on the search box for an events website. I've been recording the searches people make and alot of people are entering a {date}+{keyword} combo.
example searches:
jazz 5th november
dj shadow tonight
2nd october live music
so I need to write/find a regex that can match textual dates from within a longer string.
I'm thinkin...
There is no function as sqlite3_column_date which I need:
int i = 0;
for (NSString *key in [self valuesWithTypes]) {
id value;
if ([[[self valuesWithTypes] objectForKey:key] isKindOfClass:[NSString class]]) {
value = [[NSString stringWithUTF8String:(char *)sqlite3_column_text(statement, i)] autorelease];
}
else if ([[[self v...
Hello People, I'am using UserCake for UserManagement - in the table userCake_Users there is a column "LastSignIn" but the value is in this format: 1286066935
with this function I get the right Date
public function updateLastSignIn()
{
global $db,$db_table_prefix;
$sql = "UPDATE ".$db_table_prefix."Users
SET
...
I need to be able to recognise date strings. It doesn't matter if I can not distinguish between month and date (e.g. 12/12/10), I just need to classify the string as being a date, rather than converting it to a Date object. So, this is really a classification rather than parsing problem.
I will have pieces of text such as:
"bla bl...
I converted an older Access app to 2007, and now the date formatting in editable textboxes is not working. The format I'm using is mm/dd/yy, but the date is displaying with a 4-digit year.
I've tried other formats just for testing, eg mmm/d/yy - they display correctly except for the year which insists on being 4 digits.
This appears to...
As much as I love rails, I've always hated dealing with dates in an html form...especially when the date isn't an object's property.
The select_date helper is nice, but it always generates this:
<select name="date[year]" id="date_year">
<select name="date[month]" id="date_month">
<select name="date[day]" id="date_day">
And I can't fi...
In Ruby on Rails, there is a feature that allows you to take any Date and print out how "long ago" it was.
For example:
8 minutes ago
8 hours ago
8 days ago
8 months ago
8 years ago
Is there an easy way to do this in Java?
...
Hi, How to convert a week number to a month ?
For example, 162 weeks = 37,26 Month (so 37 Months if we around the number).
Have you an idea ?
...
Hi,
When I want setting numerical value +1 in mysql table, I use e.g.:
UPDATE table SET number=number+1 WHEN ...
How can I set date + one year?
Thanks
...
Possible Duplicates:
Difference between dates
How to calculate the date difference between 2 dates using php
So, I have two dates. For instance, 2010-09-24 and 2010-09-25. I want to check if between those two dates the difference is 1 day.
I don't need to get a value of 86400 which means one day in seconds.
Don't forget ...
I am using KSoap2 for consume web service in my application. I need to send date as parameter in the request.
Can anybody know how to send date as a parameter and send the request and please give the sample code for it.
Does Ksoap2 support date format?
Thanks
...
I have the field datetime with DATETIME type in MySQL. In PHP script I set date begin and date end like this: 11/12/1999 and 11/12/2001. In my table datetime saved in the next format: 11.11.1888 00:00:00. How can I compare these dates?
Thanks.
...
I've written a script to export product data from a cscart database to a CSV file. It works perfectly, however when opened in MS Excel, it parses things such as "12-14" as dates, which shows "Dec 14".
I read http://excel.tips.net/Pages/T003228_Stopping_Date_Parsing_when_Opening_a_CSV_File.html but the client will not be willing to do th...
I have a workbook with two spreadsheets. One is 'Daily Profit and Loss' and looks like this:
Date | Profit
01/01/01 | £1
01/02/02 | £-1
And another is 'Weekly Profit and Loss'
Week Beginning | Profit
...
How can I get the sum profit per week in the 'Weekly Profit and Loss' spreadsheet?
Cheers,
Pete
...
Hi,
I am getting date in following format, as java string:
Sat Jan 01 00:00:00 CET 2000
i want to convert it to yyyy-MM-dd fromat. For this i am doing:
String strDate = "Sat Jan 01 00:00:00 CET 2001";
SimpleDateFormat sdf = new SimpleDateFormat ("yyyy-MM-dd");
try{
Date parsed = sdf.parse(strDate);
}catch(Exception e){
System.out.pri...
Following on from an earlier question, I'm having problems using an Editor template for datetime fields, below is the code for the editor template (called "EditDateTime").
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<System.DateTime?>" %>
<%= Html.TextBox("", (Model.HasValue ? Model.Value.Date.ToString("dd/MMM/yyy...
I'm creating Unix bash script that parses web-server log file and inserts this data into database. So I need to convert timestamp which has format "05/Oct/2010:07:38:40 +0400" into "YYYY-mm-dd".
I've tried to use /bin/date -d, but it does not accept given format. I could not find a way to specify input date format for this tool. Is is p...
I have a sybase 15 DB and for one of my tables, I want to make a column default to the current date/time of the row insert. Is this possible?
In a sybase text, the following is said:
ALTER TABLE sales_order
MODIFY order_date DEFAULT CURRENT DATE
On my DB this dosn't do anything ,as CURRENT DATE is not recognized.
...
So, I have a form:
class FormBasicInfo(BasicForm):
valid_from = forms.DateField(required=False, input_formats=('%d/%m/%Y',), widget=DateInput(format='%d/%m/%Y'))
and I set the input and output formats. However, what if I want to set these formats at runtime, based on the date format preference of my user? how can that be done?
T...
All the users are in the United States. I need to be able to list all weekdays besides today. So say that it's Thursday, October 7. It should start by listing Friday, October 8 and then Monday, October 11.
I know how to make sure I'm only listing weekdays when looping through, but the trouble I have is making sure tomorrow is tomorrow. ...