Questions tagged [dayofmonth]
74 questions
0
votes
3 answers
Trying to make a program that displays days in a month
I'm trying to write a program that shows the days in a month when you type the number that corresponds to the month.
Ex. 1 = January, would print "31"
This is what I have and it seems logical to me. Although I'm just over a month into this and I…

Kyree Hammond
- 11
- 2
0
votes
4 answers
Subtract x days from day of Month
I have a date which is coming in the form of 21,23,24,25.....
What I want is to subtract 4 days from current day of the month.
My attempt is reported below but it is giving me dates in the form of dd/mm/yyyy. I just want the day.
Calendar…

Joe
- 43
- 1
- 3
- 7
0
votes
5 answers
Split day-of-month integers into digits, sum them repeatedly until get a single-digit integer
I am attempting to take two-digit integers representing day-of-month, split the digits into single digits by taking each character in the single digit and adding them together to form a new number.
e.g. If the value for day was an integer 29, then…

SeesSound
- 503
- 4
- 13
- 24
-1
votes
1 answer
how to validate 2 dates (cannot be different months)
firstDate
secondDate
2022-12-02
2023-01-02
..
...
the second date of the month follows the first date of the month, so the month of the date is can't be different
result like this :
| firstDate | secondDate |
| --- | --- |
| 2022-12-02…

Handi Tjioe
- 1
- 1
-1
votes
3 answers
How do you define the first day of the month (without including week-ends) in a batch script?
I have created a scheduled task in Windows that consists of running a batch script.
The problem is that this task has to be scheduled every 1st day of the month except for weekends.
For example, for the month of May, this task should run on May…

Labedos
- 63
- 9
-1
votes
5 answers
How to get next Friday 13th since the given LocalDate
I need to get next Friday 13th since the given date using LocalDate.
How it could be implemented?

ferenaj
- 19
- 1
-1
votes
2 answers
Using computer date and adding a day indicator
I have been trying to display the following "on this 4th day of January in the year 2022"
using javascript on an HTML page
const monthNames = ["January", "February", "March", "April", "May", "June",
"July", "August", "September", "October",…

Staffie
- 3
- 5
-1
votes
1 answer
SQL Server 2014 pivot table row and column month grant total
How can I add row and column grand totals in the table below?
I want to get total and grand total by months.
However, I couldn't do that.
SELECT *
FROM(
SELECT
YEAR(DueDate) [Year],
CASE MONTH(DueDate)
WHEN 1 THEN 'January'
…

Velvet Dreams
- 17
- 7
-1
votes
2 answers
I can't get Month and Day in Date Javascript
I am try get month and day but value is different o my text:
var fech = new Date("2021-02-28T00:00:00");
document.writeln("Year=" + fech.getFullYear());
document.writeln("Month=" + fech.getMonth());
document.writeln("Day=" + fech.getDay());
Result…

Cris Loli
- 71
- 1
- 3
-1
votes
5 answers
Convert String to Date and remove day value (always set 1 day of month)
I can convert a String to a Date:
private static final SimpleDateFormat CARD_DATE_FORMAT = new SimpleDateFormat("yyMMdd", Locale.getDefault());
public static Date toCardDateFormat(String date){
try {
return…

ip696
- 6,574
- 12
- 65
- 128
-2
votes
2 answers
How to decode the date in Android? - DATETIMESTAMP
The following code gave me Datetimestamp as [ 2020-07-183 17:07:55.551 ]. The issue is with "Day" in Datetimestamp, which has three digits. How to format currentTimeMillis into the right format for day of month?
public String Datetimesetter(long…

MdBasha
- 423
- 4
- 16
-2
votes
3 answers
How can I efficiently calculate the sales since the nth day of the month?
I have an up to date mysql database installation and I need a function to calculate the sales between the nth of the last month and today. The function will be called several times per day because I'm looking for the point at which the cumulative…

argyrg
- 47
- 6
-2
votes
2 answers
Converting arcgis date field into day of the year
I currently have multiple feature classes in ArcGIS that all contain a field either called Date, Sample_Date, or T0_Date that has the date each sample was taken. The dates do not contain leading zeros (ex. 7/4/2014 not 07/04/2014).
I need a code…

PythonPerson
- 11
- 2
- 6
-3
votes
1 answer
Does this query successfully find the first Monday of any given date's month?
My server is configured such that Sunday is day 0 and Monday is day 1. In order to find the first Monday of any given date's month, I have written this:
SELECT DATEADD(DAY,
- ((DATEPART(WEEKDAY, DATEADD(DAY, 1,…

J. Mini
- 1,868
- 1
- 9
- 38