I have tried and looked for the answer to calculate the number of days from a date to  today's date and getting an error.     Calculated columns cannot contain volatile functions like Today and Me.   Any help would be great.
124133
I want to use a combination of Today and Me in SharePoint 2013. I am trying it in Office 365 it gives me the below error     Calculated columns cannot contain volatile functions like Today and Me.   Can anyone let me know what am I doing wrong?  Formula I am using:  =Me&amp;" - "&amp;TEXT(Today,"dd-mm-yyyy")
27020
I would like to have cells C5-C39 auto fill today's date whenever data is entered into cells B5-B39.  I have tried to get it to work using =TODAY() but don't how to structure the formula.
122494
Consider:  with days as (select day::date from generate_series(date '2013-01-01', date '2013-01-01' + 365, interval '1 day' day) day )  select 'Inspections'::text as data_label, count(i.reporting_id) as daily_count, d.day as date_column from days d left join inspection i on i.close_case_date = d.day group by d.day order by d.day   This returns a set that looks like this:  data_label | daily_count | date_column Inspections    1           01/01/13 Inspections    2           01/02/13 Inspections    4           01/04/13 Inspections    8           01/06/13   Note the 1 and 2 day gaps in the record set. I need to generate a set with those values filled in with 0 like so:  data_label | daily_count | date_column Inspections    1           01/01/13 Inspections    2           01/02/13 Inspections    0           01/03/13 Inspections    4           01/04/13 Inspections    0           01/05/13 Inspections    8           01/06/13   How would I do this? I am not much of a Database Developer and am new to Postgres, so I am not sure where to start and can not find anything on how to accomplish this objective.
46539
I've got an excerpt of my spreadsheet below. It's a time tracking application containing a start date/day, a session ID and the duration of the session. Column A is populated by adding the duration in Column D. I'm trying to total the durations, but keep getting incorrect values in cases where the total duration is > 24 hours.  Consider        A                   B        C                D          1  2012/05/22 01:00  |  Wed  |  Session 23341  |  9:00 2  2012/05/23 10:00  |  Wed  |  Session 23342  | 22:00 3  2012/05/25 08:00  |  Fri  |                 |  0:00   As you can see, the date differential between A2 and A3 demonstrates that the value of 22:00 in D2 represents a duration of 46 hours (05/23 10:00 + 46:00 = 05/25 08:00). However, Column D is only displaying the 22:00 in excess of a full 24 hour day.  My attempts to read D2 have included int(d2) = 0.00  /  int(d2)*24 = 0.00  /  hour(d2) = 22.00  /  int(a3-a2)*24 =0.00 etc. and have been unsuccessful in pulling a value of "46".   How can I accurately represent D2 to achieve accurate summary data?
93606
I've got a Google Spreadsheet that looks roughly like this:   Date        | Start time  | End time    | Minutes  ------------+-------------+-------------+-----------  1/11/2012   | 11:39       | 12:41       | ?!  ------------+-------------+-------------+-----------              |             |             |    Right now if I fill in the number of minutes between the two times of day by hand. Is there a straight-forward way to calculate a time delta and have the spreadsheet do it for me?
98639
Here is my scenario:  I have to populate list with dates and some metadata of upcoming events for the following year in my Excel application. Some of the events are occurring on the same day each month, e.g. the 3rd day of month.  So the question is:  Is there any function so that I can add one month to given date, like:  cell A1: 1/23/2013 cell A2: 2/23/2013 cell A3: 3/23/2013   What did not work: Apparently A3=$A2+30 produces 3/25/2013 which is wrong.
20073
I've been using this function but I'd like to know what's the most efficient and accurate way to get it.  function daysInMonth(iMonth, iYear) {    return 32 - new Date(iYear, iMonth, 32).getDate(); }
115374
I'm trying to write a stored procedure to select employees who have birthdays that are upcoming.    SELECT * FROM Employees WHERE Birthday &gt; @Today AND Birthday &lt; @Today + @NumDays  This will not work because the birth year is part of Birthday, so if my birthday was '09-18-1983' that will not fall between '09-18-2008' and '09-25-2008'.    Is there a way to ignore the year portion of date fields and just compare month/days?   This will be run every monday morning to alert managers of birthdays upcoming, so it possibly will span new years.    Here is the working solution that I ended up creating, thanks Kogus.    SELECT * FROM Employees  WHERE Cast(DATEDIFF(dd, birthdt, getDate()) / 365.25 as int)     - Cast(DATEDIFF(dd, birthdt, futureDate) / 365.25 as int)  &lt;&gt; 0
109094
In Apex, how can you calculate the number of days between two dates excluding any days that fall on the weekend?  This would be similar to the existing  method.  There is a similar question that deals with the same issue in formula fields - .  The question  provides methods for finding the day of the week in Apex.
76394
I need to do a date comparison in Mysql without taking into account the time component i.e. i need to convert '2008-11-05 14:30:00' to '2008-11-05'  Currently i am doing this:  SELECT from_days(to_days(my_date))   Is there a proper way of doing this?
7708
How to add days to current Date using JavaScript. Does JavaScript have a built in function like .Net's AddDay?
2888
I'm building a quick csv from a mysql table with a query like:  select DATE(date),count(date) from table group by DATE(date) order by date asc;   and just dumping them to a file in perl over a:  while(my($date,$sum) = $sth-&gt;fetchrow) {     print CSV "$date,$sum\n" }   There are date gaps in the data, though:  | 2008-08-05 |           4 |  | 2008-08-07 |          23 |    I would like to pad the data to fill in the missing days with zero-count entries to end up with:  | 2008-08-05 |           4 |  | 2008-08-06 |           0 |  | 2008-08-07 |          23 |    I slapped together a really awkward (and almost certainly buggy) workaround with an array of days-per-month and some math, but there has to be something more straightforward either on the mysql or perl side.   Any genius ideas/slaps in the face for why me am being so dumb?    I ended up going with a stored procedure which generated a temp table for the date range in question for a couple of reasons:   I know the date range I'll be looking for every time The server in question unfortunately was not one that I can install perl modules on atm, and the state of it was decrepit enough that it didn't have anything remotely Date::-y installed   The perl Date/DateTime-iterating answers were also very good, I wish I could select multiple answers!
88114
I'm not used to using variables in the date format in R. I'm just wondering if it is possible to add a date variable as an explanatory variable in a linear regression model. If it's possible, how can we interpret the coefficient? Is it the effect of one day on the outcome variable?   See my  with an example what I'm trying to do.
1510
I'm working with a date in this format: yyyy-mm-dd.  How can I increment this date by one day?
600
How do I get the number of days between two dates in JavaScript? For example, given two dates in input boxes:  &lt;input id="first" value="1/1/2000"/&gt; &lt;input id="second" value="1/1/2001"/&gt;  &lt;script&gt;   alert(datediff("day", first, second)); // what goes here? &lt;/script&gt;
105534
I have a table with a column for ID, Date and Frequency of occurrence for that particular date and ID.  ID    date          Frequency 1     2014-05-18      5 1     2014-05-19      4 1     2014-05-20      25 2     2014-05-20      7 3     2014-05-18      4 3     2014-05-20      1 4     2014-05-18      6   I'm looking to insert the dates for each ID that aren't currently there (assuming that the date ranges from 2014-05-18 to 2014-05-20) and add a value of 0 in Frequency for those.  For example, you can see that  ID 1 has an observation for all three dates;  ID 2 is missing 2014-05-18 and 2014-05-19;   ID 3 is missing 2014-05-19;   ID 4 is missing 2014-05-19 and 2014-05-20.  Therefore, the output should look like this  ID    date          Frequency 1     2014-05-18      5 1     2014-05-19      4 1     2014-05-20      25 2     2014-05-18      0 2     2014-05-19      0 2     2014-05-20      7 3     2014-05-18      4 3     2014-05-19      0 3     2014-05-20      1 4     2014-05-18      6 4     2014-05-19      0 4     2014-05-20      0   I've attempted the following from . However, that will only add dates with 0 Frequency that aren't present throughout the entire table instead of on an ID level.   DECLARE @s DATE = '20140518', @e DATE = '20140520';  SELECT c.date, Frequency = COALESCE(a.Frequency,0) FROM dbo.Calendar AS c LEFT OUTER JOIN dbo.table AS a ON c.date = s.[date] WHERE c.d &gt;= @s AND c.d &lt; DATEADD(DAY, 1, @e);
106168
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 is 13:00.  What's the correct way to do this?