Questions tagged [datetime-conversion]

Use this tag for questions related to the Datetime conversion, i.e. manipulating the Datetime in such a way, that a new, different in format, Datetime is produced.

is used in its general meaning, and is usually used for questions related on how to convert a Datetime object in another, new and with a different format, Datetime object, usually for making two different programming platforms communicate.

For example, your application may produce Datetimes of a specific format, but your Database to accept another Datetime format, different from the one your application is using. In that case, a conversion form the application's format to the Database's format is needed.

316 questions
0
votes
1 answer

Java/Kotlin String Date to milliseconds conversion

I am trying to figure out how the https://www.epochconverter.com/ website converts a String date to milliseconds and then replicate the same logic in Java/Kotlin code. But I am unable to come up with an equivalent Java/Kotlin code. For example, for…
swap310
  • 768
  • 2
  • 8
  • 22
0
votes
1 answer

Convert hyphenated time duration to UTC

The format of the time I'm working on is this: 12/20/2022 2:00 - 4:00. I'd like to convert this to UTC so -8, i'd hope it'll look like this: 12/19/2022 18:00 - 20:00. The Google sheet formula =A1+(-8/24) doesn't seem to work since it doesn't…
0
votes
0 answers

How to convert from UTC Time zone to Indian Standard Time?

Error Screenshot: Image Link I'm trying to convert the UTC Time Zone i.e the value output received from utcnow() function to Indian Standard Time but this is the error: Unable to process template language expressions in action 'Compose_2' inputs…
Suruchi
  • 3
  • 3
0
votes
0 answers

Snowflake Function input is datetime, but when i call the function it's not quite working

with temp AS ( SELECT CAST(SUM(sreg.ScrapQuantity) AS INT) AS Quantity, sreas.Name AS ScrapReason, to_date((DATEADD(MINUTE, 30 * (DATE_PART(MINUTE, sreg.ScrapTime) / 30), DATEADD(HOUR, TIMESTAMPDIFF(HOUR, '0', sreg.ScrapTime),…
0
votes
0 answers

How to construct a wxDateTime from a GMT broken down date/time?

I have a string timestamp ("YYYY-MM-DD HH:MM:SS") which is in GMT and I need to make a wxDateTime from it. Since with wxDateTime, (as stated in the documentation) "the time is always stored internally in GMT", one would presume there is a…
Ivan
  • 317
  • 1
  • 4
  • 8
0
votes
1 answer

Azure Data Factory: datetime conversion

I have a pipeline with a copy activity with Salesforce as Sink and ADLS as source. I want the pipeline to copy only the records from Salesforce that are larger than the MAX(LastModifiedDate) from ADLS (Delta loads). I have a control table in SQL…
0
votes
1 answer

How to convert long to LocalDateTime?

I get this field from kafka that use avro schema: long dateTime = 1499070300000L; //value is just for example, but have to be micros It has logicalType: "logical-timestamp-micros" And I have this kind of Dto: @JsonFormat(pattern = "dd.MM.yy…
Alex
  • 21
  • 5
0
votes
2 answers

Date.toLocaleString inadequacy for conversion of a date/time to universal time

I'm trying to convert a date object to UTC. Either I'm using it wrong or the Date.toLocaleString seems to be broken or inadequate. new Date('Tue Aug 09 2022 18:43:00 GMT-0500 (Central Daylight Time)') .toLocaleString('en-US', { timeZone:…
fartwhif
  • 321
  • 3
  • 12
0
votes
1 answer

How do i convert a time in EST to Dubai timezone using UTC as my basetime

I want to convert a time(10AM) which is in EST to Asia(Dubai) timezone using UTC as my base time. I am to first convert the time (10AM) to UTC and then to Asia(Dubai) time.
0
votes
1 answer

Kibana scripted fields using painless: How to find number of days passed using a preexisting index

I have a bunch of data in Kibana that I need to clean up by using an scripted field with "painless" which is a version of Java. At the moment I have an preexisting index in my logs with a date in this format "2021-09-27T13:54:17.165Z" I need to find…
0
votes
1 answer

Convert UTC Date to LocalDateTime (with support to older Android APIs)

I'm looking for a way to convert UTC date to LocalDateTime without limiting to API 26 (Android O) and above. Is there an alternate way to do this that will support API levels below API 26? I've currently got this and it works for devices running 26…
PewK
  • 397
  • 3
  • 8
  • 19
0
votes
2 answers

How do I convert UTC DateTime to local DateTime without ending up with a different format

I have specific DateTime values in this format 'YYYY-MM-DDThh:mm:ss.ms' (e.g. '2022-05-10T13:44:00.0000000') and I need to convert them to local DateTime (which is UTC+2 for me) without changing the format (so '2022-05-10T15:44:00.0000000' is the…
Yami
  • 39
  • 5
0
votes
0 answers

Convert excel datetime to a specific format

So I have a csv file containing a column with datetime as values. The format was mm/dd/yyyy, hh:mm:ss. I want to export it to mysql but it won't accept this format. Acceptable format is yyyy-mm-dd hh:mm:ss. I already tried changing the format via…
jomx99
  • 3
  • 4
0
votes
0 answers

conversion of DATE&TMIE java

Trying to convert ist into cst but I'm not getting the expected output if, I passes the hardcoded value. Expected output is> IST:: 18-04-2022 14:11:53 CST:: 18-04-2022 03:41:53 and output I am getting after hardcode value (one month ahead) IST::…
0
votes
2 answers

Convert Time String to Numeric in R

I have the following data, it is a character and in the format of minutes:seconds. I want to convert his number to a numeric value (single number). I have tried several as.POSIXct methods to no avail. Assistance is a greatly appreciated. Data: [1]…
Brad
  • 9
  • 1