|
I have a system that compares fiscal year up to the current date to the same date range of the year before. You can adjust the year and month to look at and it always compares the same date range to the year previous. I have it set so if the current day...
Started by John Isaacks on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
$yesterday = mktime (0, 0, 0, $month, $day - 1, $year); echo datestrtotime() will do the trick....
As the "up to" date) or do they want to see day 1 of this fiscal year compared to day 1 of last? You, $month and $day are current day.
|
|
Hi
I have a table listing people along with their date of birth (currently a nvarchar(25))
How can I convert that to a date, and then calculate their age in years?
My data looks as follows
ID Name DOB 1 John 1992-01-09 00:00:00 2 Sally 1959-05-20 00:0...
Started by James.Elsey on
, 8 posts
by 8 people.
Answer Snippets (Read the full thread at stackoverflow):
(yyyyMMdd - yyyyMMdd) / 10000 = difference in full years
declare to consider the way the datediff....
Production code for nearly 10 years:
SELECT FLOOR((CAST (GetDate() AS INTEGER) - CAST(Date_of_birth throw this one out there.
|
|
When fetching a list of appointments from GroupWise some of the dates in the retrieved appointment objects do not match the values in GroupWise, in fact they are more than 50 years in the future. For instance in the following method I look for appointments...
Started by irtimaled on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Is it possible you are off by 68 years, not 58 years.
CTIME unsigned, in principle should be good for another 68 years? (2038-1970 = 68 years).
out in 2037/2038 (Feb 2038? Something like that).
|
Ask your Facebook Friends
|
I've written a method that returns the milisecond value of a string formatted date, and for some reason it's giving me dates 39000 years in the future. any ideas why?
private long getTimeInMs(String currentStartTimeString) { //String newDateString = currentStartTimeString...
Started by Omar Kooheji on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
System.out.println(new Date(timeInMs));
....
Running your code in Java 6, i get 1246978261000, which turns out to be correct.
The Date object that comes out of the parse toString's to "Tue Jul 07 10:51:01.
It looks fine to me.
|
|
Just want some basic advise on how to date again. Its been 16 years for me!
I met a woman a few weeks ago at a friends wedding and have a date with her tomorrow night. I plan on picking her up and then driving 30 mins to a really good restaurant.
I have...
Started by jaymz on
, 7 posts
by 7 people.
Answer Snippets (Read the full thread at loveshack):
I think a small gift might be too....
And if you are really stressed out, read the paper before.
Its been 16 yearsJust try to get to know another human being ... .
With her.
|
|
I need to model some information about seasons, and need to track them based on start / end date in a year-agnostic way. I.e. I need to allow users to define summer as being between, say, May 15th and September 10th, and do that for all years.
I'll need...
Started by Jean Barmash on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Trying to set Feb 29 on a non leap year will cause....
As a general point when dealing to 'normalize' dates as the leap year may cause unexpected problems, i.e.
Would hope there is already a clever util out there that does it.
|
|
I have a simple situation where I have a user supplied week number X, and I need to find out that week's monday's date (e.g. 12 December). How would I achieve this? I know year and week.
Started by Tower on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Depending on the way you are calculating week numbers and the ... .
May need to add one day to the above.
An idea to get you started:
take first day of year add 7 * X days use strtodate, passing in "last Monday" and the date calculated above.
|
|
If I wanted to work using dates and time going millions of years into the past/future how would I do it in C/C++/C#?
For example say I was working on an algorithm to see if a comet was going to hit the earth? Are there commercial or open source libraries...
Started by Tony Lambert on
, 9 posts
by 9 people.
Answer Snippets (Read the full thread at stackoverflow):
Well, not to be blunt or anything, but if it will hit the earth in like 1700 years, I don't think we'll need to know....
Instead of ms, do years, then possibly use a math library/API designed for very large: Solar Clock .
By the timestamp.
|
|
Most languages have some sort of date function where you really don't have to do any programming to get any date information you just get it from the date function/object. I am curious what goes on behind the scenes to make this happen?
Started by John Isaacks on
, 12 posts
by 12 people.
Answer Snippets (Read the full thread at stackoverflow):
Those ensure that leap years get handled correctly and no invalid date can be created, systems would store component parts of the date, day, month, year, etc as a part of the data calendar is on a 400 year....
To achieve that.
|
|
SO . I want to learn C++ .I didn't read any book on C++. Some people talk about "modern C++" and C++ programming with C influence. So which book is completely out of date?
Started by mr.bio on
, 8 posts
by 8 people.
Answer Snippets (Read the full thread at stackoverflow):
It is an outdated of date.") Both of these....
The author of "Thinking in C++" has not worked with C++ for 10 years.
(I assume the question poster meant "up to date" rather than "out really well.
Accelerated C++" to get started.
|