Segmentation fault - Core dumped in the code

This code is used to get n dates and sort them in the ascending order. I think the getdates function is not working properly. main function implementation: #include <stdio.h> #define max 30 int leapyear(int year);/*to check whether it's leap...
more »

2017-03-21 23:03 (1) Answers

Managing multiple date formats in Javascript

Similar questions has been asked many times but I couldn't find a more concrete solution. The things I'm doing are: I have a <input type="date"> inside my HTML which when clicked opens a calender with date in dd/mm/yyyy format. I change the h...
more »

2017-03-21 20:03 (2) Answers

Excel date recognition

I recognize that getting excel to import data and recognize it as a date is a common problem. I have searched through many prior posts with answers but haven't found a resolution yet: Here's what the original data looks like Data as imported I don...
more »

2017-03-21 18:03 (1) Answers

PHP Date adds 25 hours but should add 24 hours

PHP is calculating my date wrong! echo "Calc: "; echo date("d.m.Y G:i", $date); echo "(" . $date . ")"; echo "+"; echo gmdate("H:i:s", 86400); echo "(86400)"; echo "="; $date = $date + 86400; echo date("d.m.Y G:i", $date); echo "(" . $date . ")"...
more »

2017-03-21 17:03 (1) Answers

Alternate days in datepicker

I am trying to addClass in alternate Saturdays. I have tried 2 methods but none works properly. #1 I added :odd to every every tr. Demo Fiddle $('.ui-datepicker-calendar tr:odd').each(function(){ $(this).addClass('odd'); }); But If see moth o...
more »

2017-03-21 07:03 (1) Answers

Today's date in a disabled input box

I would like to ask how to display today's date into a disabled input date box? date.html: <input id="today" type="date" disabled> calender.jsp: <script>document.getElementById('today').value = moment().format('YYYY-MM-DD'); </sc...
more »

2017-03-21 06:03 (1) Answers

How do I link two input fields of type date?

I have two input fields: <input name="check_in" type="date" class="checkin"> and <input name="check_out" type="date" class="checkout" I want to link them so when i pick a date from check_in field i can only pick the current day or a later da...
more »

2017-03-21 00:03 (1) Answers

Week Number in python for regression

My current data set is by Fiscal Week. It is in this format "FY2013 WK 2". How can I format it, so that I can use a regression model on it and predict a value for let's say "FY2017 WK 2". Should I treat Fiscal Week as a categorical value and use dma...
more »

2017-03-20 23:03 (1) Answers

End of Week - Needs to be Monday

I have a SQL Query, where I need the week ending date to appear as Monday. I tested the following code, but received responses on Saturday, Sunday, Monday, etc. Please help? SELECT DATEADD(DD, 7-(DATEPART(DW, MIN([Date]))) , MIN([Date])) AS EndOfW...
more »

2017-03-20 22:03 (1) Answers

Column subtraction in R

I need help with column subtraction with slight complex subtraction rules. TimeStamp S1N0 S2N0 S3N0 S4N0 S1N1 S2N1 S3N1 S4N1 S1N2 S2N2 S3N2 S4N2 09:00 4 3 1 12 1 3 4 7 8 10 12 10 09:10 2 2 12 1 13 1...
more »

2017-03-20 21:03 (0) Answers

How to order date by DAY in Ruby on Rails

I have a page where I'm showing the birthdays of the collaborators. right now I'm querying with @Collaborators = Collaborator.where("extract(month from birth_date) = ? AND flag_removed = 0", currentMonth) and displaying the collaborator birthdate as...
more »

2017-03-20 15:03 (1) Answers

Determining an integer value based off dates?

Unfortunately, I have not been able to setup XDebug on my Windows machine / IIS in order to debug my PHP, so that's making things very difficult. Anyways, I'm running a phpBB forum and I'm trying to import data from a collection of CSV files which c...
more »

2017-03-20 13:03 (1) Answers

Date format conversion in AIX server

I am using AIX server. I have a variable containing date returned from database i.e. $ echo $date_var 12-JAN-17 Now i want to convert this string into yyyymmdd format. I issued the following command date -d $date_var +%Y%m%d But I am getting...
more »

2017-03-20 12:03 (1) Answers

How to convert this MS SQL numeric value to a date

Should be an easy convert, but cast and convert are failing me. The value I am trying to convert is: 1509180600 Other examples are 1572256200, 5150938920 I have a very large number of records and many fields where dates have been stored like this. ...
more »

2017-03-20 12:03 (1) Answers

Convert data into time stamps in R

I have a data set with observations for a few month, where every day contains an observation for every hour (24 hours). There is a Date and a Time variable, and I would like to make a time stamp combining the two in order to predict the price as a ti...
more »

2017-03-20 10:03 (0) Answers

Pandas - Counting the number of days for group by

I want to count the number of days after grouping by 2 columns: groups = df.groupby([df.col1,df.col2]) Now i want to count the number of days relevant for each group: result = groups['date_time'].dt.date.nunique() I'm using something similar wh...
more »

2017-03-20 09:03 (1) Answers