datetime-conversion Questions

6

Solved

I have an object of ZonedDateTime that is constructed like this ZonedDateTime z = ZonedDateTime.of(LocalDate.now().atTime(11, 30), ZoneOffset.UTC); How can I convert it to LocalDateTime at time ...
Lemures asked 16/4, 2018 at 9:33

17

Solved

This is a bit of my JS code for which this is needed: var secDiff = Math.abs(Math.round((utc_date-this.premiere_date)/1000)); this.years = this.calculateUnit(secDiff,(86400*365)); this.days = this...

17

Solved

I'm trying to convert times from 12 hour times into 24 hour times... Automatic Example times: 06:35 ## Morning 11:35 ## Morning (If m2 is anywhere between 10:00 and 12:00 (morning to mid-day) dur...
Nishanishi asked 7/10, 2013 at 15:51

4

I have a column "date_time" in a BigQuery table which contains unix timestamp values like "1569888224". The problem is that these values are integer data types, not timestamp data types, so I do no...

4

Solved

How to convert LocalDateTime to java.sql.Date in java-8? My search on internet mostly give me Timestamp related code or LocalDate to java.sql.Date. I'm looking for LocalDateTime to java.sql.Date. ...
Ritornello asked 14/7, 2017 at 12:10

8

Solved

So let's say I have 1400, I want to convert it into 2:00PM I tried the following: Dim convertedTime As String = DateTime.ParseExact(theTime,"HHmm", Nothing) And it would give me this: 6/12/2...
Asta asked 12/6, 2012 at 20:56

5

Solved

Considering a pandas dataframe in python having a column named time of type integer, I can convert it to a datetime format with the following instruction. df['time'] = pandas.to_datetime(df['time'...
Momentous asked 22/1, 2019 at 16:43

3

Solved

I'm using a client library (third party, not mine, cannot change) which utilizes the ThreeTen date types. My project is Java 11 and uses Java 8 date types. What is the recommended way to convert Th...
Hemiterpene asked 21/1, 2020 at 14:54

5

Solved

I like to know if it is possible to convert in Java 8 from LocalDate to OffsetDateTime. For example assume that I have got this LocalDate: 1992-12-28 Then I would like to have it converted to t...
Ailyn asked 26/7, 2019 at 6:43

6

Solved

I have two tables where column [date] is type of DATETIME2(0). I have to compare two records only by theirs Date parts (day+month+year), discarding Time parts (hours+minutes+seconds). How can I d...
Waterproof asked 3/12, 2009 at 22:22

5

Solved

I am trying to implement an ETA feature Using System.nanoTime() startTime = System.nanoTime() Long elapsedTime = System.nanoTime() - startTime; Long allTimeForDownloading = (elapsedTime * allBytes...
Lorgnon asked 12/7, 2017 at 15:1

2

How can I convert TemporalAccessor to java.util.Date? TemporalAccessor accessor = functionReturnsTemporalAccessor() Date date = Date.from(accessor) Date.from() does not accept TemporalAccessor, is...
Bifurcate asked 13/11, 2020 at 11:21

8

I want to create a function that will convert the days into milliseconds. The days format is stored as 0.2444, so how to convert this to milliseonds?
Solicitor asked 8/8, 2011 at 9:53

9

Solved

I am trying to set a server agnostic date time in my database and I believe the best practice to do so is to set a UTC DateTime. My db server is Cassandra and the db driver for Java understands onl...

3

Solved

I am trying to convert 19 digit Unix timestamp such as 1558439504711000000 (one and a half quintillion) into a readable date/time format. My timestamp ends with 6 zeros which suggests the time is i...
Lockett asked 23/5, 2019 at 14:7

4

Solved

For converting number of seconds to DateTime, in VB .NET, I use the following code: Dim startDate As New DateTime(1970, 1, 1) Dim targetDate As DateTime Dim noOfSeconds As Integer = DataInSecon...
Petrolatum asked 28/10, 2012 at 11:51

1

Solved

I need to convert a list of strings that contain date information (e.g. "2018-12-16") into DateTime format so that I can sort them all by date...and then convert back to string... I'm struggling to...
Unpeopled asked 16/12, 2018 at 12:40

2

Solved

I have a NaiveDateTime that I need to add timezone data to. For example if I have a naive_date value like ~N[2015-10-03 12:00:00.000000] and I want set it to "America/Los_Angeles" timezone, how is ...
Promise asked 30/7, 2018 at 18:48

10

Solved

It's a simple question, but the solution appears to be far from simple. I would like to know how to convert from UTC to local time. I am looking for a solution in C that's standard and more or less...
Gangboard asked 31/1, 2012 at 8:29

2

Solved

I am attempting to show transactions over a certain time period using Jodatime. Our server requires a start date and end date to be in UTC (which is probably obvious). Therefore any business logi...
Mylan asked 13/6, 2017 at 9:45

1

Solved

I am new in Mapstruct. I have a model object which includes LocalDateTime type field. DTO includes Instant type field. I want to map LocalDateTime type field to Instant type field. I have TimeZone ...

1

Solved

Is there a good way to parse milliseconds since epoch (ex. 1486252500000 13 digits) formatted time into a human readable format?
Flat asked 27/7, 2017 at 17:36

4

I wanted to ask if this was going to work, before I went on a full fledged refactor of how i handle dates and times. To frame my question, here's my problem... I store "actions" taken by the user ...
Grieve asked 19/2, 2012 at 20:33

2

Solved

I have a column in R on my dataset with values that have been converted into what I believe is a time decimal fraction based on days. I have been using this site as a reference: http://www.ca...
Eats asked 30/1, 2017 at 17:7

3

Solved

I am once again going from Windows to Linux, I have to port a function from Windows to Linux that calculates NTP time. Seems simple but the format is in Windows FILETIME format. I sort of have an i...
Copley asked 27/8, 2010 at 15:15

© 2022 - 2025 — McMap. All rights reserved.