Questions tagged [date-manipulation]

90 questions
1
vote
1 answer

c# Custom Date class, string format

First, I would like to say that the use of this is only for learning, and probably won't be used in a functional application. I have created a class (named DateHandler) that receives a Date object (custom), and it has a function that receives a…
Novak
  • 2,760
  • 9
  • 42
  • 63
0
votes
3 answers

Find week number within range of dates in Perl

I have a range of dates -- say 2012-01-30 .. 2012-04-06 -- which denote a set of weeks that fall within these dates. These weeks are numbered 1 through 10. Given today's date (for instance, 2012-02-29), I want to be able to get the week number…
Jashank Jeremy
  • 360
  • 1
  • 4
  • 14
0
votes
1 answer

Merging Data with Power Query and 2 Columns and Dates

I really need some help on merging data in Power Query. I am importing data from a file (from a network drive) and also pulling data from a static table. However I am trying to obtain a match with headers 1) Container Number 2) ETA Unfortunately the…
JDogg
  • 1
  • 1
0
votes
0 answers

How to convet a datepicker value to a string with Selenium Java

Am using Selenium webdriver with Java so I need to print my date from date picker but its failing: I want to convert this datepicker value to a string: //WebElement fullDate = driver.findElement(By.id("datetimepicker")); //String date =…
0
votes
1 answer

Substract one day of date in Jasper

i have this code in my JasperReport like that new SimpleDateFormat("dd/MM/yyyy").format(new Date()) - 24 * 3600 * 1000 but it's not working, what i'm trying is substract one day from today. But it's displaying the day of today like…
drt966
  • 5
  • 3
0
votes
1 answer

How to get a specific date of next month? (Java 8)

With today's date, I should get the 16th date of next month. For example, on passing 13-12-2021, I should get 16-01-2022. I need to get the next month 16th day from current date (input date). Examples: On passing 13-11-2021 should get…
0
votes
2 answers

Creating a temp table for the off hours of the organization

I need to create a temp table that will have a Start_Date and an End_Date column based on input parameters sdate and edate. This table is the list of the off-hours of the office which includes 6pm to 6am on weekdays. For the weekends i need the time…
SChavan
  • 57
  • 5
0
votes
2 answers

logic error in the code used for get the last day of a month

i need to write a code that takes in input an integer called mese(this int goes from 0 to 5), this integer will be added to the current month, that becouse call this function when i need to get the last day of an exact month example, it's august and…
pietro
  • 51
  • 8
0
votes
1 answer

Output most recent date Excel

I'm looking to derive a formula which will output the most recent date between cells CK:CM. My sheet looks like this: For row 2, output should be 2021-06-04, row 4 should be 2021-05-06, row 5 should be N/A. I'm currently using a nested IF statement…
0
votes
0 answers

Weekly data manipulation in python pandas based on first of month

I have monthly data in xls that I upsampled into weekly average. Now I need a condition/function to include previous month's last week if the 1st falls on a Monday or Tuesday and reaverage current month. I was using pandas resample(). Sample input:…
Nathair
  • 1
  • 1
0
votes
1 answer

function returning two calendaristic dates to represent date of monday and date of sunday according to calendaristic date which is the parameter

Can you help me with a function that receive a parameter which is the calendaristic date(12.4.2020) and returning me two dates that represent dates of monday and sunday(11.30.2020 - 12.06.2020). What i have until now is: function getWeek(d){ …
0
votes
3 answers

Function that return me the previous day

Can you help me with this problem? I tried to make a function that receives a parameter of type Date e.g. 12.11.2020. I want it to return the previous day. function getPreviousDay(d) { var dateObj = new Date(d); var previousDay =…
0
votes
1 answer

SQL query for date intervals comparing non-adjacent rows?

I want to flag the first date in every window of at least 31 days for each ID unit in my data. ROW ID INDEX_DATE 1 ABC 1/1/2019 2 ABC 1/7/2019 3 ABC 1/21/2019 4 ABC 2/2/2019 5 ABC 2/9/2019 6 ABC 3/6/2019 7 DEF …
0
votes
1 answer

Calculating time in log file using python

I have this log file (log.txt): omer| (stmt : 0) | adminT| Connection id - 0 omer| (stmt : 0) | adminT| Start Time - 2018-11-06 16:52:01 omer| (stmt : 0) | adminT| Statement create or replace table amit (x date); omer| (stmt : 0)| adminT| …
tupac shakur
  • 658
  • 1
  • 12
  • 29
0
votes
2 answers

Shell script for date manipulation

I want to do something if the date is in between 08:03 an 14:03 in a script. but when I try dt=`date +%H:%M` if [ $dt -eq 08:03 ] then echo $dt > msize.txt #echo "iam im 1 if" fi it doesn't work. This file is run in crontab in every minute.…
Sunil Sahoo
  • 23
  • 1
  • 6