I need a date formula in Oracle SQL or T-SQL that will return a date of the previous week (eg Last Monday's date).
I have reports with parameters that are run each week usually with parameter dates mon-friday or sunday-saturday of the previous week. I'd like to not have to type in the dates when i run the reports each week.
The data ...
If I import a library to use a method, would it be worth it? Does importing take up a lot of memory?
...
One of our customers wants to be able to enter a date with only 2 digits for the year component. The date will be in the past, so we want it to work for the previous century if the 2 digit year is after the current year, but work for the current century if the 2 digit year is equal to or less than the current year.
as of today 10/30/200...
I'm in javascript, running this in the console
d = new Date();
d.setMonth(1);
d.setFullYear(2009);
d.setDate(15);
d.toString();
outputs this:
"Sun Mar 15 2009 18:05:46 GMT-0400 (EDT)"
Why would this be happening? It seems like a browser bug.
...
I need to add 30 minutes to values in a Oracle date column. I do this in my SELECT statement by specifying "to_char(date_and_time + (.000694 * 31)", which works fine most of the time. But not when the time is on the AM/PM border. For example, adding 30 minutes to "12:30" [which is PM] returns "1:00" which is AM. The answer I expect i...
Published Date returned from Twitter Search API Atom Feed as 2008-11-03T21:30:06Z which needs to be converted to "X seconds/minutes/hours/days ago" for showing how long ago twitter messages were posted.
Think this can be done with php date() function using DATE_ATOM value?
...
I'm trying to convert my sites from CF8 to openBD. I have a cfloop in a site that loops over a date range.
In essence, I want to insert a new record into the db for every 2 weeks (step) of a date range (from and to)
my loop looks like this...
<cfloop
from = "#form.startDate#"
to = "#form.endDate#"
index = "i"
step =...
I saw a potential answer here but that was for YYYY-MM-DD:
http://paulschreiber.com/blog/2007/03/02/javascript-date-validation/
I modified the code code above for MM-DD-YYYY like so but I still can't get it to work:
String.prototype.isValidDate = function()
{
var IsoDateRe = new RegExp("^([0-9]{2})-([0-9]{2})-([0-9]{4})$");
...
How do I add a certain number of days to the current date in PHP?
I already got the current date with:
$today = date('y:m:d');
Just need to add x number of days to it
...
What's the quickest way to convert a date in one format, say
2008-06-01
to a date in another format, say
Sun 1st June 2008
The important bit is actually the 'Sun' because depending on the dayname, I may need to fiddle other things around - in a non-deterministic fashion. I'm running GNU bash, version 3.2.17(1)-release (i386...
Is there any reason to use a varchar field instead of a date field in MySQL? I'm looking at an existing site and I see the developer has done this. Is there any reason to?
...
With Java Version 1.5.0_06 on both Windows and Ubuntu Linux :
Whenever I add minutes to the date "2008/10/05 00:00:00" , it seems that an extra hour is wrongly added.
ie: adding 360 minutes to 2008/10/05 00:00:00 at midnight should arrive at 2008/10/05 06:00:00
But it is arriving at 2008/10/05 07:00:00
The totally perplexing thing is...
I'm looking to calculate the number of months between 2 date time fields.
Is there a better way than getting the unix timestamp and the dividing by 2 592 000 (seconds) and rounding up whithin MySQL?
...
Hi,
I'm trying to create number of Evenement instances and set the date for them:
for (int i=2004; i<2009; i++){
evenementen.add(new Evenement("Rock Werchter", "Rock", "Werchter", 200000,
(Date)formatter.parse(i+"/07/03")));
But I can't seem to get it to work,
Any ideas?
...
I know this may be simple but being C++ I doubt it will be. How do I convert a string in the form 01/01/2008 to a date so I can manipulate it? I am happy to break the string into the day month year constituents. Also happy if solution is windows only.
...
I have a time represented as the number of seconds elapsed since midnight, January 1, 1970, UTC (the results of an earlier call to time()). How do I add one day to this time?
Adding 24 * 60 * 60 works in most cases, but fails if the daylight saving time comes on or off in between. In other words, I mostly want to add 24 hours, but somet...
I'm only just starting out with python so I'm still pretty clueless.
What I'm trying to do is to get the date from the pc and adding it to a list.
This is my code:
import datetime
today = datetime.date.today()
print today
This prints: 2008-11-22 which is exactly what I want BUT....I have a list I'm appending this to and then suddenly ...
I'm code reviewing a change one of my co-workers just did, and he added a bunch of calls to Date.toMonth(), Date.toYear() and other deprecated Date methods. All these methods were deprecated in JDK 1.1, but he insists that it's ok to use them because they haven't gone away yet (we're using JDK 1.5) and I'm saying they might go away any ...
I am grouping on a date field. The tree explorer for the report when data is displayed shows the date as 3 days before the date that is in the records. The detail in the report lists the correct date. I have verified the field shown in the report and the Group field are pointing to the same database-table-field. I have also set the forma...
How do I subtract 30 days from a date in PowerBuilder?
I have the following code that returns today's date in a parameter, but I need today - 30 days:
dw_1.setitem(1, "begin_datetime",
datetime(today(), Now()))
...