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

Convert Olson/tz timezone time to universal time and vice-versa in Node.js

Say I have time for a given Olson/tz database timezone, for example, July 1st, 1973 at 15h 23min in Africa/Maputo. How can I convert it to universal time UT and vice-versa in node.js? I have seen some libraries online, but the documentation is…
Jérôme Verstrynge
  • 57,710
  • 92
  • 283
  • 453
0
votes
0 answers

How to change military time to decimal time?

I have a little problem here with getDecimalTime method. I don't know if there is some kind of formula that will help me change military time (e.g 0645 -> 06:04 am) to the decimal time. public class TimeInterval { int time1; int time2; int…
user5166960
0
votes
0 answers

Unix time to Human time in R

My dataset follows such structure: author, thread, created, converted Created is in Unix time, converted is to be changed to POSIXct format. I have converted the data to subset using POSIXct` format: data$converted <- as.POSIXct(data$created/1000,…
0
votes
1 answer

How to use Standard Time Only in TimezoneInfo.ConvertTime C#

I am having a Issue with the C# function of TimeZoneInfo.ConvertTime(). What i need to get is the Standard Time not the DST but i'm only getting DST is there a way to Tell the Function to only get the Result in Standard Time. My local Timezone is…
0
votes
4 answers

Find TotalDays between two Datetime? variables

DateTime? arrival = (DateTime?)(t.ArrivalDate.Value); DateTime? departure = (DateTime?)(t.DepartureDate); Okay i know both of them are nullable and .TotalDays does not work on nullable object. So kindly tell me how am i supposed to find days…
Waqar Ahmed
  • 203
  • 1
  • 4
  • 17
0
votes
2 answers

iOS: Date not converting correctly

Say for instance, I have a date: 2014-11-24 12:24:25 stored in an NSString variable. I'm trying to convert that to an NSDate object so that I can calculate a future date: NSDate *futureTimeStamp; NSDateFormatter *dateFormatter = [[NSDateFormatter…
Sandy D.
  • 3,166
  • 1
  • 20
  • 31
0
votes
1 answer

Method to convert a MM/DD/YYYY into YYYYDD (julian day)

Is there any way on how to convert mm/dd/yyyy (my computer date) into yyyydd (julian day) in batch process?
0
votes
0 answers

timespan to minute conversion issues between scrollbar and textbox in VB.NET

I have a textbox linked to a scrollbar so that when the scrollbar is scrolled to the right it scrolls from 0 to 1440(interval = 1), which is then converted from minutes to a timespan, this timespan is then displayed the textbox, strange thing is, I…
WouldBeNerd
  • 629
  • 11
  • 29
0
votes
1 answer

Jquery localize UTC Date Time

I am trying to localize my date and I am getting NAN invalid date. What would be the mistake? My Code in fiddle function localizeUTCDateTime(date) { var utcdate = new Date(date + " UTC"); return utcdate.toDateString() + " " +…
Kurkula
  • 6,386
  • 27
  • 127
  • 202
0
votes
1 answer

Sql Server Local to UTC conversion

I've been wrecking my head with this for the last day or so, and I hope someone here can shed some light. I recently migrated to Amazon RDS SQL Server which is in UTC. However, all my times in the database are in the local time zone (Western…
sTodorov
  • 5,435
  • 5
  • 35
  • 55
0
votes
2 answers

Conversion error when converting 'nvarchar' to 'datetime' in sql server

I have this code : DECLARE @StartDate nvarchar SET @StartDate='22/10/2014' SELECT CAST (@StartDate as datetime) And it gives me this error: Conversion failed when converting date and/or time from character string. Can anyone suggest a better…
0
votes
3 answers

Trouble converting from time to decimal time

Part of the task I have been given involves performing calculations on a few columns, 2 of which are in the format of hh.mi.ss and they're varchar. In order for the calculations to work, I need to get them into a time decimal format, whereby 1:30…
Cucko Oooo
  • 91
  • 4
  • 14
0
votes
1 answer

Kendo grid converting datetime to greenwich time

I have a kendo grid with a datetime column. The format of the column is to show time only. columns.Bound(p => p.Brief).Format("{0:HH:mm}").EditorTemplateName("BriefTimePicker").Width(100); the data that is being loaded into the column is coming…
Corey Witherow
  • 2,472
  • 2
  • 26
  • 37
0
votes
1 answer

How to convert datetime fileds to UTC Datetime for existing data in the database?

How can I change the Datetime values for the existing data to UTC Time? Is any inbuilt SQL qry available to change? Eg. Existing Data in the table CreatedON 2013-03-01 08:12:00.000 2013-03-01 13:15:18.000 2013-03-01 13:10:00.000 Need to convert…
SESHI
  • 33
  • 2
  • 7
0
votes
2 answers

PHP - Converting Seconds to Minutes discrepancy

I'm running into a discrepancy with either my conversion of an integer into defined Minutes. I figured I'd double check on some sites to see if the conversion is…
coffeemonitor
  • 12,780
  • 34
  • 99
  • 149