Questions tagged [days]

A day is a unit of time which is equal to an interval of 24 hours. It may be used for example for measuring the length of a period (see also period tag). For questions about dates or day of week rather consider tags like date or dayofweek.

554 questions
3
votes
2 answers

How to sort "days ago" formatted date in jqGrid?

How can I sort the "days ago" formatted date in jqGrid ? When I sort the grid currently, it can't distinguish between "11 hours ago" and "1 days ago". So "1 day ago" is sorted on the top instead of "11 hours ago". **Please refer this image of the…
Nas
  • 33
  • 4
3
votes
4 answers

How to SELECT data from table only recorded the last three days

I recorded data in field 'date' by mysql NOW() function. I want to SELECT data which recorded the last three days(today, yesterday and the day before yesterday),but no idea to do this. SELECT * FROM tlb_students WHERE date ...?... ORDER BY date…
AJ OP
  • 345
  • 2
  • 5
  • 16
3
votes
1 answer

Calculating number of days between a date and today in SQL Server?

I want to calculate number of days from a date. For example, we have @date='03/16/2012'. I want to get number of days up to now. How can I do it?
Ram Singh
  • 6,664
  • 35
  • 100
  • 166
3
votes
1 answer

Getting the dates of the current week in Android

I have these 5 buttons in my program: Monday, Tuesday, Wednesday, Thursday and Friday, which are on my menu screen. What I want now is that when my program starts and my menu screen opens, the buttons contain the days + the dates of the day. For…
Confituur
  • 495
  • 1
  • 6
  • 16
2
votes
4 answers

C# iterate backwards over date

I am looking for a C# solution that will allow me to iterate backwards over a date. Starting at the current date or provided date I would like to loop over the date subtracting one day each time through the loop for a given number of days. It…
Baxter
  • 5,633
  • 24
  • 69
  • 105
2
votes
2 answers

VB.NET - counting days between two dates with exclusions

I'm trying to count the days between two dates, excluding Saturdays and Sundays. I've written this code so far Dim startDay As Integer Dim endDay As Integer Dim days As Integer Dim count As Integer startDay = dtpStartDate.Value.DayOfWeek endDay =…
Isuru
  • 30,617
  • 60
  • 187
  • 303
2
votes
4 answers

Calculate the number of days between two dates in C – Convert date to days

Recently, I found myself in the need to know the number of days separating two dates for a little program I was writing in C. I searched online for a solution but found nothing for C. How could I do it?
Enrique
  • 61
  • 1
  • 6
2
votes
2 answers

How to reorder the days of week in this Pandas Pivot Table?

import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import datetime df = pd.read_excel("Baltimore Towing Division.xlsx",sheet_name="TowingData") df['Month'] =…
jcalderin
  • 47
  • 5
2
votes
3 answers

change day by clicking on button

I want that each time I'm clicking on button that I see the Next day from day array list The only way that I could get an answer is Math.random() to have different result each time I am clicking on button, but I want that show me the next day each…
Clean_Code
  • 23
  • 4
2
votes
1 answer

Precision problem when calculate number of days in javascript

I need calculate number of days between two dates on javascript - it seems easy task, but i have wrong result only on javascript. I start to make test in Excel and there formula: =ДНИ(ДАТА($F$1;$E$1;$C$1);ДАТА(1930;2;4)) In English i think…
Vasilij Altunin
  • 754
  • 1
  • 5
  • 18
2
votes
1 answer

Number of days in leap years with IsoChronology

2000 CE is a leap year with 366 days. 2001 CE and 2002 CE do not leap years and have 355 days. Logically, if I ask the number of days between January 1st, 2000 CE and January 1st, 2001 CE, I should get one more day than between January 1st, 2001 CE…
Gzorg
  • 809
  • 4
  • 10
  • 25
2
votes
1 answer

Calculation of days until next and since last holiday based on date in Data Frame in Python Pandas?

I have Data Frame like below: import pandas as pd df = pd.DataFrame() df["date"] = pd.date_range("2015", periods=5) And list of holidays like: holidays = ["30.12.2014", "02.01.2015", "10.10.2015"] And I would like to calculate for each date in df,…
dingaro
  • 2,156
  • 9
  • 29
2
votes
2 answers

Convert date to day of year without using datetime

I have to return the day of the year (int) for a given string date (e.g. "September, 14, 2019") WITHOUT using datetime. I also have to make it basic enough to where I can make two other similar functions for different calendars. This is what I had…
Anna
  • 21
  • 2
2
votes
0 answers

Days of Stay counter with php

I'm a little stuck on my homework. I'm doing a hospital days counter, The time, day, month and year of entry are recorded, as well as a possible exit with day month and year. The program needs to calculate the days of stay each month and charge them…
2
votes
1 answer

How to highlight selected day or days in react big calendar

I want to create an calendar similar to airbnb and therefore I would like to be able to highlight the selected days in react big calendar. I have found a similar question, but it doesn't really answer what I need: How to select multiple days in…
uzzi
  • 551
  • 2
  • 9
  • 29