Questions tagged [date]

A date is a reference to a particular day represented within a calendar system, and consists of year, month and day.

0
votes
0answers
10 views

Date format anomaly from array output

I have a 2D array and have to print parts of it to a sheet, when I do print it to a sheet most dates appear exactly as they do in the locals window. Some of them don't instead appearing as US Date ...
-4
votes
0answers
29 views

wrong date result while parsing the string to Date [duplicate]

i am using the below string format to convert to Date format. But giving as a wrong result as shown below. String stringDate = "201906"; Date date = new SimpleDateFormat("YYYYMM").parse(stringDate); ...
0
votes
2answers
19 views

Get current time based on Timezone even if user changed his device time

I'm trying to create a timer which compares a date sent from a server and the user's device date. Problem is when the user changes his device time, it affects my timer. Is there a way to get the ...
-1
votes
0answers
10 views

is there any way to use buttons for opening and closing with specific time period [on hold]

I am going to develop cinema ticketing software I use QR code on tickets for authentication. now i wanna scan tickets only for current show for example show time 11 to 12, 1, 2 and 3 to 4. just ...
0
votes
0answers
12 views

How to pass dates to pandas date_range

I would like to supply the start and end date as arguments/parameters into the pandas date_range function but it is not processing them as dates. Running the following works fine and returns the ...
1
vote
2answers
28 views

Subtract two dates and times, and find if the later value exceeds 2 hours

Writing a Google sheet, and need the formula to evaluate two dates and times, and determine if the later value exceeds 2 hours and a day. IE, In - Out 1/1/19 2:00 - 1/1/19 3:59 1/1/19 2:00 - 1/1/19 ...
0
votes
1answer
8 views

Chart binding with database problem cause Date format

I'm trying to bind chart to database. Database contains more columns (id,sum , date , categoryID, and many more. My problem is, im not able to bind chart with sum and date. Sum should be on Y axes and ...
0
votes
2answers
12 views

Node JS parsing new Date(“12345”) to “+012345-01-01T06:00:00.000Z” (year 12345)

When I test this code in the browser, it processes dates in a logical way (invalid date), but in NodeJS new Date("12345") creates +012345-01-01T06:00:00.000Z Here is my test for NodeJS $ node -e '...
0
votes
1answer
21 views

filemtime is returning garbage values in php

I am working on a php code as shown below: $src_dir = ('\\\INVEST-ST-001\test\podcast\incoming_folder'); $mp4_files = preg_grep('~\.(mp4)$~', scandir($src_dir)); $file = $mp4_files[$key]; ...
3
votes
4answers
53 views

How to change date from yyyy-mm-dd to dd-mm-yyy using Spark function

I'm working on Apache spark project on eclipse using Scala I would like to change my date format from yyyy-mm-dd to dd-mm-yyyy This is my code: val conf = new SparkConf().setMaster("local")....
1
vote
2answers
28 views

How to convert a date column in TSQL to display only the month and year

I have a column called DateId that is an int, and displays the date as 20190626. I was able to convert it to a date using the below query, but I would like to display it only as Month and Year. I ...
1
vote
2answers
25 views

Date format M-Y

I'm trying to find the 12 latest date in the format 'M-Y' using format('M-Y') but I got an error like: class: "Symfony\Component\Debug\Exception\FatalThrowableError" message: "Call to a member ...
2
votes
1answer
16 views

Google Sheets - Date Format Display Issues

I'm currently building dashboards in Google Sheets and have run into a consistent issue with dates being displayed as a number opposed to a date format. EX: 43626 opposed to 6/11/19. This data is ...
0
votes
0answers
24 views

How can I add an event to Calendar using a start date, start time, and end time in Swift? [duplicate]

I am building an app that allows the user to add an event to their iOS calendar. I am using event store to add this event. The user has provided the following information: start date, start time, and ...
0
votes
0answers
13 views

mySQL triggers to keep a history of record edited or inserted [duplicate]

I'm using MySQL version 8..., and my database is using InnoDB format. And I need some help to keep track of my "records" when they are edited or new ones are inserted. So I came with the idea of ...
1
vote
1answer
20 views

Decrement date by 1 day

Parameter "date" holds the value of one of the date captured from response data. Now, we have to pass the value of date as 1 day prior. Like, date=05/01/2019 is one of the value, next we want is 04/...
0
votes
1answer
12 views

Casting a date in MySQL returns the previous date

I've got a doubt this question. Why MySQL is returning the previous date when doing this cast?. select cast('2019-06-26' as datetime) as date1, cast('2019-06-26' as date) as date2, ...
-2
votes
0answers
12 views

ThreeTenABP when date changed by user

I tried to change the date at Settings at Android phone for example, 28/6/2019. After that, I open my apps and saved the data including the date as Instant.now() toString. The date was stored and ...
-3
votes
3answers
47 views

How to compress an array of dates to their months?

I need to compress the array of dates to their months. Using the slice method and the library moment.js, I want to compress the array to their months. Here I get the last date of the month for the ...
0
votes
3answers
37 views

How to search the date format 20180603 present inside a file using java?

I have a file in which the words are delimited by "|". Here I need to search the date "20180603". However, I can't hardcode the value to be search. The date format is fixed YYYYDDMM and the date can ...
0
votes
2answers
32 views

How to implement Date.add(date, n, :month) in Elixir

Would be nice to have this in the standard Elixir library, but we don't. Date.add(date, n, :month) # where n could be +/- How would you implement this? This looks like a good starting point: https:/...
0
votes
2answers
33 views

Javascript Date() returning invalid date in IE (version 11) [duplicate]

I hardcoded date string in one variable and passing this in new Date() let hardcoded = "10/4/2018 12:00:00 AM"; console.log($.type(hardcoded)); // String is printing console.log(hardcoded); // ...
2
votes
2answers
32 views

JavaScript wrong timestamp formatting [duplicate]

I'm currently trying to format a timestamp in JavaScript. Sadly, the result is a bit strange. This is the date I'm trying to format: Thu May 23 2019 17:34:18 GMT+0200 (Mitteleuropäische Sommerzeit) ...
-2
votes
0answers
7 views

how to convert m.dd.yyyy h:mm:ss AM/PM to datetime using function

how to convert m.dd.yyyy h:mm:ss AM/PM to datetime using function 6.26.2019 5:55:39 PM (text) to (datetime)
1
vote
1answer
22 views

Assign index values on dates in Excel

I have a seemingly easy to solve question, but I am really stuck! I have a set of dates and I am aiming to assign an index value to those dates. Specifically, I want each month of each year to have a ...
0
votes
2answers
34 views

How to ensure the latest two files are copied with matching dates using powershell?

I am using Powershell to copy two files into a drive. These files are created everyday, however sometimes one file is updated and the other does not. How do I ensure that the latest files are copied ...
0
votes
2answers
14 views

Laravel Datepicker Failed to parse time string

I'm trying to build a query in Laravel using whereBetween and I have a problem with the dates-range. I'm using Carbon to get the inputs, looking like this: $dateRange = Carbon::parse($request->get(...
0
votes
2answers
45 views

How to increment and decrement date by 1 day using next and previous button in react?

I want to next date and previous date using next and previous button in react. I have tried by creating two buttons Next and previous button but it's not working properly when the month starts and ...
3
votes
1answer
34 views

Get array of dates between today and given date in Swift?

I have a date in string format, "yyyy-MM-dd" and would like to return an array of the difference in dates in that same format from today. For example, the given date is "2019-06-29", and today's date ...
0
votes
2answers
38 views

Date( 'YYYY-MM-DD') constructs a Date that is one day behind than specified (Javascript) [duplicate]

Observe the following code and it's output let str = '2019-06-21'; let dateObj = new Date(str); console.log(dateObj) > Thu Jun 20 2019 19:00:00 GMT-0500 The Date object is a day behind than what ...
1
vote
4answers
67 views

Filter an array of objects by date that > than date.now

I'm having some problems with arrow functions and filtering array of objects by value of date. I've tried to filter it but it returns full array, and did'nt working as it must be. in the end i've ...
-2
votes
0answers
29 views

How can you get the date in C++ in the form yyyy-mm-dd? [duplicate]

I need the date in the form yyyy-mm-dd as a string. In C++, what is the best way of getting the date?
0
votes
2answers
29 views

Get only the Date and not the Day Date and Time for Yesterday and Tomorrow

I am looking to get yesterday and tomorrow's date but right now my code returns: "Wed Jun 26 2019 15:32:10 GMT-0400 (Eastern Daylight Time)" when I only want: "06/26/2019" I currently have this ...
0
votes
3answers
31 views

Formatting timestamp

I have the below date in a table. Table APEX id search_date 1 04-OCT-18 08.36.12.000000 PM I would like it to display as the below format. Is this possible? id search_date 1 10/...
-1
votes
0answers
14 views

What is the proper way to handle/store date quarters?

I've thinking what is the proper way to represent a quarter. I've seen people recommending: Two columns. One for year and other for quarter. One column as a string using a YYYY-Q format. Like 2019-...
0
votes
3answers
36 views

Sort String Json Date

I am getting date values like that: "/Date(1560458281000)/" from an array of objects. I just want to order these dates by descending and ascending. I am open to any examples with pure JavaScript and/...
0
votes
1answer
23 views

Hibernate SQL query compare only date in timestamp field

I have to get the list of records based on last_update_Atfrom mysql DB. It is a timestamp field in mysql. From my java code am passing the date in the below format. Mon May 06 20:05:32 IST 2019 In ...
-1
votes
1answer
25 views

Why is 'weeks' from specific date not calculated?

I have a sample q below that contains three dates of dd/mm/yy in q$test test 1 210376 2 141292 3 280280 I want to create a new covariate q$new that calculates the date difference from q$test to ...
0
votes
1answer
28 views

How to add date AND time to google sheet cells in an online form filled by an html form

I have a google sheets which is populated automatically by an HTML form from a website. I need the exact date and time of users who have entered their info. So, when they fill their info and pres ...
0
votes
0answers
9 views

Date not formatting in POSIX, always turns to NA

I have a csv with the date format in 6/16/2019 4:00:00 AM which is classed as a character. This is on Windows with R 3.6 All these give NAs: wbvdf$timestamp <-as.POSIXct(wbvdf$timestamp, format ...
0
votes
0answers
24 views

SSRS Date from Date Parameter cannot be selected if Dataset query returns null or empty

I am using parameters PeriodType where depending on what will choose will set Dates for DateFrom, DateTo parameters like in the following example: Period Type (DateFrom, DateTo) Yesterday - 06/24/...
-1
votes
0answers
14 views

I am creating event calender. How boxDisplay and totalDaysofMonthDisplay is calculated and how it is used?

I am creating event calendar. How are boxDisplay and totalDaysofMonthDisplay calculated and how are they used? $totalDaysOfMonth = cal_days_in_month(CAL_GREGORIAN,$dateMonth,$dateYear); $...
2
votes
2answers
28 views

Racket: Custom predicate to use withing contract

I'm writing small pet project in Racket and using Gregor lib to handle dates. I have function that accepts two dates (from Gregor, not standard library) and I would like to add contract for it. ...
1
vote
1answer
34 views

iOS Get Time Zone String Without DST Offset

I am looking for a list of timezones but when try to generate that I get the DST offset added to it. But I want the standard time, not the one with DST. Here is the code I am using. For Denmark, I am ...
-5
votes
1answer
27 views

Convert numerical date to text date format in python

I have a text , and in the text I have a date with format 22/09/1992, I want to convert this date to twenty two september ninteen nighty two in python how do i do that. Text- My name is edwin .I ...
1
vote
2answers
30 views

How to trim outliers in dates in python?

I have a dataframe df: 0 2003-01-02 1 2015-10-31 2 2015-11-01 16 2015-11-02 33 2015-11-03 44 2015-11-04 and I want to trim the outliers in the dates. So in this example I want to ...
-1
votes
3answers
45 views

Binary operator '>=' cannot be applied to operands of type 'Date' and 'Date?' [duplicate]

I am trying to compare two dates, One is from server and other is my local device time. I don't know why it's showing this error. let deviceDate = Date() let calendar = ...
-4
votes
3answers
53 views

Jquery how to validate input on specific characters and to follow specific pattern

I have an input field where users are supposed to enter their date of birth. The pattern which I want to use is for example 24-06-2019. So, now I want to make some kind of validation, and if the user ...
0
votes
0answers
17 views

How can i get unix time from a date string generated from strftime?

I'm having a date string that generated from strftime(), it's looks like "T2, 06/24/2019" then i user strtotime("T2, 06/24/2019"), it's not return a unix time string. I have to use another function ...
0
votes
2answers
24 views

NodeJs - date format changes when assigned to a variable

i've this code below and the output. any idea why does this happen and how to keep the date as is when assigned. // y is fetched from mysql database console.log(y); => result (2019-07-10T02:30:00....