Skip to main content
Filter by
Sorted by
Tagged with
9 votes
7 answers
1k views

I need to iterate through the whole hours of an interval of a particular day. So given the time at one whole hour on the day in question, say, 01:00, how do I find the next whole hour? The next whole ...
Anonymous's user avatar
  • 87.4k
2 votes
1 answer
404 views

I'm getting the issue when converting string to TimeOfDay. It was working before but now I am getting the issue. try { final format = DateFormat.jm(); //"6:00 AM" TimeOfDay day = ...
Alpit Panchal's user avatar
-1 votes
1 answer
251 views

when user using 24 hours format, I have pick time with showTimepicker have set alwaysUse24HourFormat:false and when selecting time displays in 12 hour format but selected timeofday is 24 hours format ...
Deva's user avatar
  • 122
0 votes
1 answer
1k views

I have two string time. How can I get a duration of period between theese two time? I try to use DateTimeFormatter, but it doesn't work. val startTime = LocalDate.parse("19:30", ...
Jekis Osipov's user avatar
0 votes
1 answer
475 views

In ggplot2, I have a question about appropriate scales for making POSIXct datetimes into time-of-day in an axis. Consider: library(tidyverse) library(lubridate) library(hms) library(patchwork) test &...
evidently's user avatar
1 vote
4 answers
453 views

String time = "Thu Dec 22 01:12:22 UTC 2022"; How to fetch the HH:MM:SS (01:12:22) here using java regex . So the output should be 01:12:22 I am using the below code but its not working. ...
Zoso619's user avatar
  • 177
1 vote
2 answers
100 views

I'm trying to make a if-else statement that if user put time which have past, it will alert the user that the time has past. And I also unable to set the timedialogpicker to the current time when the ...
Haziq Mt Roslan's user avatar
1 vote
2 answers
118 views

My string value; 09:00-10:00,12:00-14:30,16:00-18:00 (this string repeats time intervals n times like this) and I want to find out that a string is in the correct format using pattern matching; ...
Valorous33 's user avatar
1 vote
0 answers
133 views

I was working on Time conversion from One Locale to another (US to Swedish) in android using Java. It is working well on all the devices except Samsung devices. DateTimeFormatter parser = ...
Shobhith's user avatar
  • 495
1 vote
2 answers
321 views

I need to display a schedule for users that displays times from earliest to latest time. I have a TimeOfDay list containing times and need it to be sorted from earliest to latest time. I made a ...
nsa41620's user avatar
-1 votes
1 answer
543 views

I need to import a CSV to a panda dataset. The CSV has columns with just a time of the day, an example is a columns with "16:45" at a minutes level, another column has "21:03:39" ...
user1015767's user avatar
1 vote
0 answers
197 views

I always get this error Trying to read from 08:43 at position 6 whenever am converting from TimeOfDay to String using _pickedTime.format(context). It throws the error on my real device but works ...
Emeka Jide's user avatar
0 votes
0 answers
201 views

The code simply extract the time portion of two timestamps and sub them from each other to get the duration import java.util.Calendar; public class Test { public static void main(String[] args) { ...
A.Alqadomi's user avatar
  • 1,589
-1 votes
1 answer
107 views

String time ="6:30" How can I convert it to CST time zone? If a user enters any time, it should convert into CST.
Akshay Kala's user avatar
3 votes
1 answer
4k views

i want to print the Time that i initialized manually but if i print it then i only get this here. I/flutter (14375): TimeOfDay(15:00) Here is my Code Future<void> ausgabe(BuildContext context) ...
Eren G's user avatar
  • 63
0 votes
3 answers
2k views

Hi i have an array contains List<dynamic> am = ['09:00', '09:30', '10:00', '10:30', '11:00', '11:30']; and if they are selected String time = '09:00' how can I change time to the DateTime ...
Noah_J.C_Lee's user avatar
1 vote
0 answers
485 views

I am trying to compare two dates in C#. One is a sunset date and one is the current date. I am trying to determine whether it's after or before sunset. I have two dates like that: 2021-12-02 16:19 (...
cesq's user avatar
  • 345
4 votes
2 answers
4k views

Tests created previously use DateTimeFormatter.ofPattern("ha"); and returns "10AM" (for '2017-04-09T10:00-06:00[US/Mountain]'). Under my MacOs and Java ['openjdk version "11.0....
THM's user avatar
  • 681
0 votes
1 answer
70 views

String current = "07:00:00.160" DateFormat df2 = new SimpleDateFormat("HH:mm:ss.SSS"); DateList.add(df2.parse(current)); Returns [Thu Jan 01 07:00:00 GMT 1970] I have tried ...
Robertas Streikus's user avatar
-1 votes
2 answers
154 views

I am using HH:mm format to print the hour and minute in java. It will give the time in format 05:12, 00:04. But my requirement is to get with single digit hours: 05:12 => 5:12 00:04 => 0:04 10:...
Mandrek's user avatar
  • 1,211
0 votes
1 answer
178 views

I want to add AM or PM at the end of time and for that I have tried doing like DateFormat('hh:mm a') it add AM or PM but then it picks a wrong time. How to fix this? Pls help me:- Future selectTimeEnd(...
GAGAN SINGH's user avatar
0 votes
1 answer
746 views

From a time input in format 5:00 to 05:00! in arr[1] there is "5:00" <--string format DateTimeFormatter time=DateTimeFormatter.ofPattern("HH:mm"); LocalTime arr1 = LocalTime....
SOURABH KUMAR MAJI's user avatar
0 votes
2 answers
183 views

I'd like to write two methods which both rely on the information on how much time is left in the day (how many seconds there are left till the end of the day, as well as how much percent of the day ...
MostCheerfulSmile's user avatar
-1 votes
5 answers
742 views

The problem is for Java I want to take time input as follows 12:00 AM 11:42 PM There will be a sequence of such inputs up to N lines. Here two different Time Inputs are given 1)12:00 AM 2)11:42 PM ...
Manav Sarkar's user avatar
0 votes
2 answers
41 views

<html> <p id="time"></p> <script> var theDate = new Date(Date.parse( '06/14/2020 9:41:48 PM UTC')); document.getElementById("time&...
user3279936's user avatar
-1 votes
1 answer
708 views

I'm writing a function that adds minutes to a time string - without using any libraries for Time. The function takes two arguments - The first, a "time" ([H]H:MM AM|PM) String, in the ...
PainIsAMaster's user avatar
0 votes
2 answers
341 views

I have this input: { "MONDAY" : "02:39:00" } Which is a DAY and time that needs to compared to "availability" : { "SUNDAY" : { "from" : ...
Fireburn's user avatar
  • 1,032
0 votes
1 answer
81 views

I'm making a program designed to get the elapsed time via military time and this is what I got so far: public class TimeInterval { private int firstTime; private int secondTime; public ...
Nebulor's user avatar
  • 23
0 votes
1 answer
1k views

I want my program to reset statistics when new work shift starts. My shift hours are predefined as: Day shift 4:00 - 16:25 Mon-Thu (4:00 - 15:55 Fri-Sun) Eve shift 16:25 - 4:00 Mon-Thu (15:55 - 4:00 ...
W.Donald's user avatar
  • 135
-1 votes
3 answers
3k views

I'm a beginner in java and I with my code below I can generate a random time in "hh:mm:ss" format . I have no idea how to tweak my code to display time in "hh:mm" format as I am ...
VASILEIOS SKENTOS's user avatar
0 votes
3 answers
1k views

I want to make the addition of two times (java.sql.Time) without using any other library (java.date, LocalTime..), I get always the time under 1 hour. java.sql.Time Time heureDebut="09:00:00&...
Mohamed Drira's user avatar
-2 votes
2 answers
472 views

I needed to convert only the hour part of 12 hour time string to 24 hour format. I'm not interested in other than hour parts of a date string. SimpleDateFormatter is notoriously buggy and I in fact I'...
Tonecops's user avatar
  • 165
1 vote
3 answers
1k views

So I have a date value I had to convert to a timestamp in order to pass the value to a specific method. However, in order to finish the work, I've been told the value of the timestamp's date has to ...
Jack Parker's user avatar
0 votes
2 answers
2k views

Currently I get a number from the BE that states like 750 minutes (int) and should represent the time of day. 750 minutes = 12.5 hours and so the UI should display 12:30 1080 minutes = 18 hours and ...
Dennis Anderson's user avatar
-1 votes
3 answers
2k views

I had a String time format like 08:25 now how can I convert to float time value String guestclosetime = getCurrentTime(); SimpleDateFormat timeFormat = new SimpleDateFormat("HH:mm"); ...
Lahari Areti's user avatar
0 votes
0 answers
219 views

I have two fields of type TimeOfDay in a model class, which is called startTime and endTime, how do i store this type into a firestore field, as a Timestamp somehow? What i want to achieve is to pick ...
Fluzzy's user avatar
  • 81
0 votes
1 answer
531 views

I should have two times, one is the current time and the other I get it from time picker as shown below. How can I get the difference between them?
Nader Salah's user avatar
1 vote
2 answers
7k views

I have a time-picker that displays the current time the user selects. I am able to convert it from 24 hour to 12 hour format. But I want it to also display AM and PM, not just AM. Is there any way to ...
Bashaar Shah's user avatar
0 votes
0 answers
25 views

Essentially I'm going to be reading in a time string from the user in the format "HH:MM:SS" in 24hr format. I want to be able to say if HH > 12, then assign a variable "PM" and if HH < 12, then ...
fuzzdelay's user avatar
0 votes
1 answer
62 views

I was working on a HackerRank question where I turn time in 12 hour format (hour:min:sec am/pm) into 24 hour format (hour:min:sec) (eg hh:mm:ss) . I got everything done, with 3 int variables for hour, ...
BrownBear2018's user avatar
0 votes
2 answers
4k views

I am trying to calculate the time difference in java by input time format in 12 hours it works well when i input start time 11:58:10 pm and end time 12:02:15 am. But as i enter 12:00:00 am and 12:00:...
Azeem Hafeez's user avatar
2 votes
3 answers
860 views

I get time with time zone (without date component) from a PostgreSQL server in json like this { "time": "03:00:00+01" }. How do I handle this in Android? Is there any structure which can hold just ...
yaugenka's user avatar
  • 2,881
2 votes
2 answers
376 views

I have nearly 500k of CCTV files in different folder map to X drive and I need to delete all of them with specific timing such as from 12midnight to 6 am only but keeping the remaining regardless of ...
iSpoon's user avatar
  • 27
1 vote
1 answer
113 views

I'm creating a SteppedArea chart in Google Visualization to display queue length at various times of the day. My problem is that the steps in the chart don't align with the associated times. They ...
CitFar's user avatar
  • 11
21 votes
9 answers
40k views

I am trying to format the selected time from time-picker in my flutter app. I don't know why but this is proving to be more difficult than it should be. The end result I am trying to achieve is hour:...
theSimm's user avatar
  • 450
40 votes
11 answers
35k views

TimeOfDay documentation has no comparison operator and primitive comparison does not work. My only solution that I can thinking of right now is to convert TimeOfDay to DateTime and use DateTime's ...
Jesse's user avatar
  • 3,100
0 votes
0 answers
50 views

I need to send the time of day to the API but TimeOfDay does not result right response (API returns null). If I set the time manually (commented in code) its working fine. Debug watch shows similar ...
PCG's user avatar
  • 2,311
1 vote
1 answer
2k views

in my flutter app the user picks a time and I need to simply add some hours and minute to it to display the result. Is that easily possible? Unfortunately, there doesn't seem to be a function like ...
tmaihoff's user avatar
  • 3,620
0 votes
1 answer
2k views

I want to create a google line chart from MySQL data which is in json form. JSON data is in this format: { "result": [ { "Date": "Dec 17,2017", "start_time": "22,...
Nouman Yasin's user avatar
2 votes
2 answers
399 views

Dim time As String = TimeOfDay.ToString("tt") Dim time2 As Integer = TimeOfDay.ToString("hh:mm:ss") If time = ("du.") Then timehre = (time2 + 12) Debug.WriteLine("munkaidoben") ...
Ntohing_Trolll's user avatar