Questions tagged [datetime-comparison]

102 questions
1
vote
2 answers

comparison operators between time values mysql

I am trying to return all the records on a certain date and less than an exact time my SQL looks like this WHERE date = '2014-08-28' and UNIX_TIMESTAMP(time) < '14:48:22' This returns all the time records and doesn't cutoff the time at the…
0
votes
2 answers

Date part of a DateTime field for comparison

I'm using Superlist with a due date column (SQL DateTime) as a column in dd/mm/yyyy format. I need, in order to the final user be able to sort by this column, to use just the DATE part of the column. The problem is that if I set the DueDate.Date…
Nane
  • 318
  • 1
  • 8
  • 18
0
votes
1 answer

SQL Server 2008 - Compare time column to current DateTime

I have read through related posts but have not yet found an answer so if I may: I have a column created in my table as follows: [Arrival] time NOT NULL, What is the most efficient way to perform a query like this: select * from myTable where…
Klaus Nji
  • 18,107
  • 29
  • 105
  • 185
0
votes
3 answers

Compare LocalDateTime with long

I have a timestamp (ts1) stored in a long, expressed in nanos since epoch. I want to be able to compare it with another timestamp (ts2), which I know is for today 8am The aim is to know if ts1 is after or before ts2. I have ts2 as below: LocalTime…
mandhan
  • 3
  • 2
0
votes
2 answers

Limit the time of use of a .exe with POWERSHELL

I've been looking during 2 days for a sotfware which allows me to limit the time I play(or use any program) and I found nothing usefull so I decided to put my coding cape back since 6 years ago and program it myself. A friend recommended me…
0
votes
0 answers

Kotlin date time comparison

I am trying to figure out how this works. My initial date is: "2022-11-06T08:39:16.307Z" So now I did this: val sdf = SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'") sdf.timeZone = TimeZone.getTimeZone("UTC") val time: Long =…
Jalson1982
  • 287
  • 4
  • 14
0
votes
1 answer

How can I compare ISO dates in Javascript

How can I compare ISO dates in Javascript. Hour and Minute does not give correct results. function ConvertDateNowToISODate() { var currentDate = new Date().toISOString(); currentDate = new Date(currentDate).getTime(); …
0
votes
1 answer

Comparing stored time string to DateTime('now')

I'm storing time as a string in my database... hopefully that's not my problem, I need to compare that stored time/date to the current time/date and get days/hours/minutes. It's stored in this format... 11-10 07:42 PM I assign that string to…
0
votes
2 answers

How to compare/find a list of XMLGregorianCalendar dates

For eg: we have a List dates we need to find the latest date in this list. Really appreciate your help!
0
votes
1 answer

Day calculation from PowerQuery not correclty transformed to excel table

I am using PowerQuery to create a certain date time duration column. I have the following xlsx table: DateTime1: =A2+B2 DateTIme2=D2+E2 DateDiff=F2-C2 Now I want to transform Column G "DateDiff" with PowerQuery. I select the Range A to G and click…
0
votes
2 answers

Compare Date and Time range with Java

I have this input: { "MONDAY" : "02:39:00" } Which is a DAY and time that needs to compared to "availability" : { "SUNDAY" : { "from" : "00:00", "to" : "10:00" }, "MONDAY" : { "from" : "00:00", "to" :…
Fireburn
  • 981
  • 6
  • 20
0
votes
1 answer

compare format of time string in java

I have two time strings that can be in any format(12 hours or 24 hours, with or without timezone). How do I compare if their format is different in java and if data mismatch is there? PS> I have prepared a list of regex expressions and matching…
0
votes
2 answers

How do I compare date and hour from a variable and date and hour of Windows?

I made this code: string[] liness = File.ReadAllLines(ofd.FileName); if (liness.Length > 0) { string lastLine = liness[liness.Length - 1]; string[] columns = lastLine.Split(';'); if (columns.Length > 0) { string date =…
Steve
  • 5
  • 2
0
votes
1 answer

Excel Cell Formula: Intermittent Error Comparing Calculated vs. Manually Entered Time Values

NOTE: I have verified several times by several different methods listed here on StackOverflow that these cells contain values not text! I am trying to write a scheduling workbook that can tell me whether or not my current staffing is adequate. There…
0
votes
1 answer

check if startTime and endTimer are between two times

I am working on a project for booking venues. The aim is to not allow the booking if the venue is already booking during this period if (!alreadyBookedSet.isEmpty()) { SimpleDateFormat simpleDateFormat = new SimpleDateFormat("HH:mm"); …