Questions tagged [datetimeoffset]

1

votes
0

answer
101

Views

JasperSoft Studio - How to handle DateTimeOffset

In SQLserver we have this type DateTimeOffset witch the only diferent with DateTime is that we have an Offset of the time zone. JasperSoft Studio (6.3.0 Final) don´t work with this type as you can see: java.lang.ClassNotFoundException: microsoft.sql.DateTimeOffset cannot be found by net.sf.jaspe...
Willas
1

votes
0

answer
220

Views

Pandas Custom Business Day Calendar Offset

'This is a basic question that I can't seem to find addressed anywhere. I understand how to make a custom business day calendar per the pandas documentation. However, I have a datetime index that is already created and is 'customized'. It is a date range with particular dates eliminated: custom_dat...
Windstorm1981
1

votes
1

answer
69

Views

Merge multiindex pandas dataframes on a lagged datetimeindex

I am having difficulty: Merging two pandas multiindex dataframes Passing an offset to a datetimeindex in the merge df1: date ID Attr_1 12/31/2010 13 A 9 B 1 C 1/31/2011 13 D 9 E 1 F df2: date ID Attr_2 12/31/2010 13 -0.124409 9 0.555959 1 -0.705634 1/31/2011 1...
akr24
1

votes
1

answer
60

Views

c# convert DateTimeOffset to zulu time in razor

is there any extension i can use to convert/display my DateTimeOffset type property to Zulu time in razor (cshtml file)? example: DateTimeOffset = 1028 -----> Zulu = 1428 none of the ToString extension can convert to zulu. example below myDate.ToString('t') i like to know if i have to make a conver...
Dnguy025
1

votes
0

answer
72

Views

DateTimeOffset.TryParseExact() with non English characters

I'm basing my question on this answer string str = @'30-מאי-18 14:18:15 +03:00'; DateTimeOffset res; CultureInfo culture = new CultureInfo('he-IL'); culture.DateTimeFormat.Calendar = new System.Globalization.HebrewCalendar(); if (DateTimeOffset.TryParseExact(str, 'dd-MM-yy HH:mm:ss', culture, Da...
styx
1

votes
1

answer
90

Views

Java LocalDateTime/ OffsetDateTime to Swift 4

What's the equivalent of LocalDateTime and OffsetDateTime in Swift 4? I am trying to encode Java dates and decode them in Swift using Json. It seems like there is only one Date object in Swift.
gke
1

votes
0

answer
30

Views

protobuf-net surrogate for DateTimeOffset

I would like to set up a surrogate for Nullable. I looked at the various examples, and I think what I am doing is correct: [ProtoContract] public class DateTimeOffsetProxy { [ProtoMember(1)] public DateTime? UtcTime; public static implicit operator DateTimeOffsetProxy(DateTimeOffset? value) { retur...
rjrizzuto
1

votes
0

answer
22

Views

Time of last file modifcation returns a one year offset since DST change

To get the modification time of a file I use path.getmtime from ftputil, but since the DST-change the returnvalue of recently created files has an offset of one year, saying the last modification time of new files is from last year. Actually the file was modified one hour in the 'future'. The reason...
NoWater
1

votes
1

answer
552

Views

Parse string as DateTimeOffset in Expression<Func<T, bool>>

Hey, I am trying to create an Expression in which a string property is converted/cast to a DateTimeOffset so that DateTimeOffset operations can be performed on it. We are using Linq2SQL as our data provider, which does support converting strings to the SQL equivalent of DateTimeOffset. Ideally I wa...
NoizWaves
1

votes
1

answer
1.9k

Views

How can I convert my DateTimeOffset to a Twitter Date/Time?

How can I convert a DateTimeOffset.Now into a twitter-compatible date/time? Twitter example: Tue Apr 07 22:52:51 +0000 2009 cheers :)
Pure.Krome
1

votes
2

answer
4k

Views

Using DateTimeOffset as WHERE criteria in a SQL Server 2008 query

I was wondering if anyone could help me understand why these two criteria do not return the same result sets. To me, it seems weird that SQL Server 2008 R2 wouldn't know to use the offset while constraining the data. Is there a better way to do this? As far as I can tell, Criteria Two is the only wa...
Christopher Haws
1

votes
2

answer
188

Views

Generating and ordering timezone regions

How do I output timezone offsets based on the list of regions present in http://php.net/manual/en/timezones.php ? Ideally, I would like it 'arranged' in UTC-12:00 to UTC+12:00 format. So, America/New_York should generate UTC-4:00 UTC should be UTC Asia/Damascus should be UTC+3:00 etc It should matc...
siliconpi
1

votes
1

answer
1k

Views

How do I read a MSSQL DateTimeOffset column in a Visual C++ application?

I have an Visual C++ (MFC) application using ADO to access a Microsoft SQL Server database. I'd like to start using DateTimeOffset columns but I'm getting an exception. Here's a code snippet: HRESULT hRes = pRecordset.CreateInstance(__uuidof(Recordset)); FieldPtr fieldPtr = pRecordset->Fields->GetIt...
Robin Minto
1

votes
1

answer
180

Views

How do you call an instance method on BCL type from T-SQL without uploading a full SQLCLR assembly?

I have a datetimeoffset column in a table with varying TZ offsets in the rows. I'd like to run them all through the ToLocalTime method on the BCL type System.DateTimeOffset (due to Daylight Saving, I can't just use the SWITCHOFFSET function). The 'clr enabled' is already reconfigured. The 'brute f...
James Manning
1

votes
2

answer
1.1k

Views

Is it possible to set DateTimeOffset to a SAME offset for all the Silverlight clients?

I use DateTimeOffset for the date/time values. And what I want to achieve is, for all the clients who load their page to run a SilverLight app., I want them to see the Dates according to a specific zone, for example Tokyo time. So no conversion to their LocalTime will occur. Is it possible to con...
pencilCake
1

votes
2

answer
1.1k

Views

How to figure out if the Date string contains time offset added already in Javascript?

Consider this date string: '2012-08-20T15:00:00-07:00' It has time offset added as '-07:00' How can I find out it has this offset added? I know I can do it with regular expressions. But is there any other easier way? Or does any one have the regex for it?
Ishita
1

votes
1

answer
252

Views

Is there any case where DateTimeOffset might not be reliable?

I understand that to refer a single point in time DateTimeOffset is better and more reliable way compared to DateTime as it replaces .Kind property by a more convenient thing that is the Offset to UTC. Does this solve all the issues regarding to storing a single point in Date-Time or are there still...
pencilCake
1

votes
1

answer
414

Views

System.DateTimeOffset in your WCF proxy conflicts with System.DateTimeOffset

I generated a WCF proxy using svcutil when I tried to compile the file it generated the error(warning as error which I can't disable) that System.DateTimeOffset in your =proxy conficts with System.DateTimeOffset. I saw the proxy file it has DateTimeOffset. I used svctutil 4.0.30319.18052 to generat...
user2845026
1

votes
1

answer
536

Views

Create “Default Values or Binding” for new coumn having Data-Type of DateTimeOffset(7)?

When you create a new table in the database and you added a new column, having data-type of DateTimeOffset(7). What do you use as 'Default Values or Binding' for this DateTimeOffset as default? Thanks..
fletchsod
1

votes
1

answer
577

Views

How to get UTC time offsets from a geolocation

We can find some lists of the UTC time offsets, showing the difference in hours and minutes from Coordinated Universal Time (UTC), from the westernmost (−12:00) to the easternmost (+14:00). In general, we save datetime using iso8601 format. However - by default - we just includes some countries an...
Zag zag..
1

votes
2

answer
125

Views

Get DateTimeOffset for another DateTimeOffset

I have an web api that return events. Each event occurs at a given date which is abstracted as a DateTimeOffset. Now on the server I want to check if a given event has occured according to the event datetimeoffset, not the server datetimeoffset. For example an event has datetimeoffset 2014-02-06 10:...
ZNS
1

votes
1

answer
233

Views

Undefined offset: 1 using mysql_real_escape_string($data[0])

Good day again guys. APOSTROPHES gettin on my nerve. Please Help guys! I get this error when the RESPO column have an APOSTRPHE word on it 'OFFICE'S'. Notice: Undefined offset: 1 in xxx:\xxxx\www\ptoms2\reports\view_reports.php on line 14 Notice: Undefined offset: 1 in xxx:\xxxx\www\ptoms2\reports\v...
user3571148
1

votes
1

answer
215

Views

Get daylight savings time (DST) for year

I'm working with an API that requires DST details for the year that first interval in a time series data falls on. For example, for an account located in America/Chicago I need to know: # If data starts in 2014 DST Start: 2014-03-09 02:00:00 DST Stop: 2014-11-02 02:00:00 # If data starts in 2009 DS...
mpz
1

votes
2

answer
252

Views

How to store date only value from CalendarDatePicker to SQLite database in Windows 10 universal app

In my Windows 10 universal app i use the CalendarDatePicker to select a date: In Code behind i use the following code to store the date to a SQLite database: booking = new Bookings(); using ( SQLite.Net.SQLiteConnection conn = new SQLite.Net.SQLiteConnection(new SQLite.Net.Platform.WinRT.SQLitePlatf...
Uwe Becker
1

votes
1

answer
74

Views

Pandas Single Timestamp with index of offsets

This may be a straightforward answer, but I'm not seeing it in the Pandas v0.17.1 documentation. I have a set of data that includes a start time in the header and then for each row of data there are offsets in milliseconds. Time Input A 0 0 3.3337 1 500 3.3096 2 1001 3.3044 3 1501 3...
Chris
1

votes
2

answer
481

Views

Converting UTC to Local Time - How do I store/deduce the local time of my data capture

I have an application which receives data from several data gathering points, potentially deployed anywhere in the world. They post to a queue in an Azure Service Bus and a Console application reads from the queue and stores this data with a UTC timestamp and an Id representing the location it came...
1

votes
1

answer
593

Views

In SSMS, display DateTimeOffset value in local timezone

Isn't there a way to configure Sql Server Management Studio to, in query results, display the value of a DateTimeOffset column in the client's local timezone, instead of UTC? Example: I'm in timezone +02:00. A value is stored as 2016-07-27 22:00:00.0000000 +00:00. Currently, this value is displayed...
Vincent Sels
1

votes
3

answer
166

Views

Sql Server Data Types

I am writing a script that will generate a column of every data type within sql server. I know that sql-server considers things like decimal(5,1) and decimal(5,0) as different data types, however the various resources that I have looked at (w3schools and the microsoft reference page) do not make it...
Jacob Alley
1

votes
1

answer
119

Views

Internationalization for datetime

I am building a mobile app and would like to follow best practice for datetime. Initially, we launched it in India and made our server, database and app time to IST. Now we are launching the app to other countries(timezones), how should I store the datetime? Should the server time be set to UTC and...
Akhil
1

votes
2

answer
287

Views

Determine the number of hours between two DateTimes in a specific Time Zone, taking DST into account

I'm trying to write a function that will (1) run on a machine in any time zone, (2) calculate the number of hours between two dates, and (3) take DST settings for the given time zone into account... It seems so easy, but I can't seem to figure it out. I'm generating work schedules in other time zone...
Langdon
1

votes
1

answer
608

Views

How to change type from String to DateTimeOffset object

I'm trying to change the type of a string to a DateTimeOffset object. var Result = Convert.ChangeType('2017-02-27T18:00:00.0000000+01:00', typeof(DateTimeOffset), CultureInfo.InvariantCulture); I've tried also with these strings 2017-02-27 18:00:00Z 02/27/2017 18:00:00 But I always obtain an Inva...
Matteo
1

votes
2

answer
1.1k

Views

QlikView and timezones

Why does this show the same time twice: =Now() & ' ' & TimeZone() & '\n' & ConvertToLocalTime(Now(), 'UTC') & ' UTC' This shows: 2017-04-08 07:53:27 GMT-08:00 2017-04-08 07:53:27 UTC I'm trying to conditionally-format a pivot table expression based on whether its start timestamp is 'in the future'....
r2evans
1

votes
1

answer
91

Views

Azure Function - Queue Trigger returns DateTimeOffset as null

I have an Azure Function running that connects to an API, gets some data and saves it to a queue in Azure. Then I have another Azure function running as a trigger on that queue and I am having some problems with the DateTimeOffset? property on one of the objects in the data. All the other properties...
sth
1

votes
2

answer
151

Views

Parse String as UTC DateTimeOffset When No TZ Specified

I am developing a simple web API client. On of my models has a ExpiresOn property that I have specified as a DateTimeOffset. public class Model { public DateTimeOffset ExpiresOn { get; set; } } I deserialise the API reponse from a JSON string using JsonConvert.DeserializeObject(). I have noticed th...
Minustar
1

votes
1

answer
0

Views

Get HOUR from AT TIME ZONE

My DB is in Azure. I need my local (Israel) time. SELECT GETDATE() AT TIME ZONE 'Israel Standard Time', DATEPART(HOUR,(GETDATE() AT TIME ZONE 'Israel Standard Time')) returns 13: (No column name) (No column name) 2018-12-07 13:43:34.893 +02:00 13 I need it to return 15, since it's 1...
mshparber
1

votes
1

answer
0

Views

Ruby: Offset interpreted differently by Time and DateTime

Does anyone know why Time.parse seems to misinterpret the offset?? # Correct: ruby-1.9.2-p136 > DateTime.parse '2011-04-07T13:53:00-3' => Thu, 07 Apr 2011 13:53:00 -0300 ruby-1.9.2-p136 > Time.parse '2011-04-07T13:53:00-3' => 2011-04-07 13:53:00 +0300 The format doesn't seem to make any difference...
polarblau
1

votes
1

answer
0

Views

Do I need to get client's actual timezone or can I assume they are all in the EST timezone? (US-only web application)

I have a question about dealing with date & time in my web application. The application will sell monthly subscriptions. It shows dates only when clients buy and cancel subscriptions. Clients can buy additional services in the middle of the month. Application calculates a pro-rata to charge the clie...
jdias
1

votes
1

answer
0

Views

Which SQL datatype should I use to store datetime from GPS devices?

I'm working on a project where I have to gather data from GPS devices located in different countries (timezones + daylight savings) and display those data to different users also from different countries. I'm thinking about saving the date in UTC format (that is what I receive from the GPS device) b...
sdagkas
1

votes
2

answer
2.2k

Views

SSIS getdate into DateTimeOffset column - data value overflowed the type

I have an SSIS package. The source is a SQL query. The destination is a table. The package worked until I changed a column in a destination table from datetime to datetimeoffset(0). Now, all records fail with a 'Conversion failed because the data value overflowed the type used by the provider' er...
Mayo
1

votes
1

answer
606

Views

SSM doesnt allow me to edit a Datetimeoffset field in edit top 200

SQLserver version Microsoft SQL Server Management Studio 10.0.5500.0 Microsoft Analysis Services Client Tools 10.0.5500.0 Microsoft Data Access Components (MDAC) 6.1.7601.17514 Microsoft MSXML 3.0 4.0 6.0 Micr...
phil soady

View additional questions