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

Inline function in React isn't running

I am trying to convert a time string that is formatted as 24 hour into 12 hour. To do this, I created a function that will reformat then render it. However, when I place the function inline like {times &&…
Brandon
  • 1,447
  • 2
  • 21
  • 41
0
votes
3 answers

In .Net, how do I convert between SystemTime and FileTime?

As per https://msdn.microsoft.com/en-us/library/windows/desktop/ms724290(v=vs.85).aspx, a file time is a 64-bit value that represents the number of 100-nanosecond intervals that have elapsed since 12:00 A.M. January 1, 1601 Coordinated Universal…
user1889116
0
votes
1 answer

Python - Timestamp Conversion

I have converted some sensor data into CSV format. The data contains a timestamp attribute that is divided into two parts as follows: measurement_timestamp_begin: seconds: 3733032665 fractions: 3056174174 I need to convert this into standard…
0
votes
2 answers

What is my mistake to convert Date into minutes?

Based on How to convert Standard Date into minutes in java? information, I follow this technique to convert date into minute, but an output is not as an expected value (e.g., 12 hour -> it should be 720 minutes). Here is my source code …
Mr.Kim
  • 186
  • 1
  • 10
0
votes
2 answers

C# How to convert date 25APR18 to 2018-04-26?

That question may be already been answered here, but I could not find any answers. I'm trying to to convert the string 25APR18 to 2018-04-25. I tried to do the following: DateTime.ParseExact("25APR18", "yyyy-mm-dd",…
gene
  • 2,098
  • 7
  • 40
  • 98
0
votes
2 answers

DateTime Conversion Issue From LocalTime to UTC while saving in db on Published site

I am trying to save a DateTime to a database. When I run the code from my server machine and save the date to the db, it saves the DateTime correctly, but when I deploy the site to production, access it from my local machine, and try to save the…
0
votes
2 answers

Time conversion to a path file

I have a path files which are named by time (201803061500) etc. What I need is a time conversion, because I use while loop to open a few of them there is an error when I want files from for example (...1555 to ... 1615) and Python sees an obivous…
Hiddenguy
  • 547
  • 13
  • 33
0
votes
1 answer

date time set to calendar with specific time zone not giving correct convert date time of other time zone in java

Here I am giving parameters like month, date, hourofday, seconds like(2,14,11,0), first setting zonevalue (IST). Calendar localTime = Calendar.getInstance(); localTime.setTimeZone(TimeZone.getTimeZone(zoneValue)); localTime.set(2018,…
0
votes
3 answers

How can I convert datetime : 1518427800 to hh:mm:ss dd/mm/yyyy in node.js?

I am trying to built a attendance app for my college where in I am fetching data for a web time-table application which has a sql backend and there the lecture start time and end time is in format 1518427800. I am not even sure what format is this.…
0
votes
2 answers

Date as longvalue to LocalDateTime

How to convert a long value like 2018051822111234L to yyyyMMdd HH:mm? 2018051822111234 -> 2018 05 18 22:11:12. I tried with LocalDate.parse and DateFormatter(yyyy-MM-dd'T'HH:mm:ssZZZZZ). It doesn’t work for me.
DevJam
  • 19
  • 8
0
votes
2 answers

Converting IST to local time in angular js

From server I am getting time in this format "21/11/2017 17:01:30", and this time is in IST. I want to convert this time to the users local time. I am using below given code for that, var startDateTimeArray = eachExeRun.startDate.split(" "); var…
Anna
  • 973
  • 4
  • 13
  • 26
0
votes
1 answer

Conversion of large dataframe column of string to datetime - unexplainable behavior

I have a file containing date and time information as a character string. I want to convert it to a datetime POSIXlt object and to that end I use the strftime() base function in R. While the command works fine when I am passing it a character…
rf7
  • 1,993
  • 4
  • 21
  • 35
0
votes
2 answers

Compare String time to Local Server Time

Have a string object with a specific format of date. Need to check if that dateStr is after the current time on local machine. Having trouble with conversions and LocalDateTime String dateStr = "Oct 27 2017 02:29:00 GMT+0000"; public static final…
Ashok Goli
  • 5,043
  • 8
  • 38
  • 68
0
votes
4 answers

Conversion of varchar into Datetime

Why does the following code work: CAST(DateOfAction AS Date) but this code does not: CAST(DateOfAction AS Datetime) note: DateOfAction is a varchar field Can someone explain this and give the right code?
0
votes
2 answers

Convert from Millisecond to String of Date

I try to convert from Milliseconds to string of date. However, the result is not correct as my expected. The input is milliseconds (Ex: 1508206600485) My time zone is UTC +10:00 ------Expected--------------------------------------------…