tagged [datetime]
How do i convert HH:MM:SS into just seconds using C#.net?
How do i convert HH:MM:SS into just seconds using C#.net? Is there a tidy way of doing this rather than doing a split on the colon's and multipling out each section the relevant number to calculate th...
Python speed testing - Time Difference - milliseconds
Python speed testing - Time Difference - milliseconds What is the proper way to compare 2 times in Python in order to speed test a section of code? I tried reading the API docs. I'm not sure I underst...
- Modified
- 19 Apr at 23:8
Linq to SQL DateTime values are local (Kind=Unspecified) - How do I make it UTC?
Linq to SQL DateTime values are local (Kind=Unspecified) - How do I make it UTC? Isn't there a (simple) way to tell Linq To SQL classes that a particular DateTime property should be considered as UTC ...
- Modified
- 5 May at 04:16
Where's the DateTime 'Z' format specifier?
Where's the DateTime 'Z' format specifier? [: ] I've been trying to perform roundtrip DateTime conversions with a format string that uses 'zzz' format specifier, which I know is bound to local time. S...
What is the (best) way to handle dates before Christ in C#/.NET?
What is the (best) way to handle dates before Christ in C#/.NET? Is there any built-in support for that? And if not, is there any consensus about handling such dates? --- Links to owncoded solutions, ...
Convert a date and time into a MS SQL select query using SelectParameters
Convert a date and time into a MS SQL select query using SelectParameters I have this situation where I have a SqlDatasource control and the select query is like: The source of @date is a label with t...
- Modified
- 29 May at 11:37
How do I convert an interval into a number of hours with postgres?
How do I convert an interval into a number of hours with postgres? Say I have an interval like in postgres. How do I convert that to a number of hours (106 in this case?) Is there a function or should...
- Modified
- 4 Jun at 19:8
Java Timestamp - How can I create a Timestamp with the date 23/09/2007?
Java Timestamp - How can I create a Timestamp with the date 23/09/2007? How can I create a Timestamp with the date 23/09/2007?
How to represent a DateTime in Excel
How to represent a DateTime in Excel What is the best way of representing a `DateTime` in Excel? We use Syncfusions [Essential XlsIO](http://www.syncfusion.com/products/back-office/xlsio) to output va...
Format .NET DateTime "Day" with no leading zero
Format .NET DateTime "Day" with no leading zero For the following code, I would expect to equal 2, because the MSDN states that 'd' "Represents the day of the month as a number from 1 through 31. A si...
- Modified
- 12 Jun at 18:48
Creating a range of dates in Python
Creating a range of dates in Python I want to create a list of dates, starting with today, and going back an arbitrary number of days, say, in my example 100 days. Is there a better way to do it than ...
How to truncate milliseconds off of a .NET DateTime
How to truncate milliseconds off of a .NET DateTime I'm trying to compare a time stamp from an incoming request to a database stored value. SQL Server of course keeps some precision of milliseconds on...
Error inserting data using SqlBulkCopy
Error inserting data using SqlBulkCopy I'm trying to batch insert data into SQL 2008 using `SqlBulkCopy`. Here is my table: ``` IF OBJECT_ID(N'statement', N'U') IS NOT NULL DROP TABLE [statement] GO C...
- Modified
- 21 Jun at 14:47
WPF XAML StringFormat DateTime: Output in wrong culture?
WPF XAML StringFormat DateTime: Output in wrong culture? I'm having some trouble with the output of a DateTime value. My computer's current culture is set to de-AT (Austria). The following code result...
How to get difference between two dates in Year/Month/Week/Day?
How to get difference between two dates in Year/Month/Week/Day? How to get difference between two dates in Year/Month/Week/Day in an efficient way? eg. difference between two dates is 1 Year, 2 Months...
Retrieving a DateTime value from a DataRow (C#)
Retrieving a DateTime value from a DataRow (C#) How can I get `DateTime` value in C# from row, the current code is giving me error any help is appreciated, the data is coming in from progress database...
Ordering nullable DateTime in Linq to SQL
Ordering nullable DateTime in Linq to SQL I have started using Linq to SQL for a project im working on and i have run into a problem when ordering by a DateTime field but since the DateTime allows nul...
- Modified
- 10 Jul at 06:12
C#: Making sure DateTime.Now returns a GMT + 1 time
C#: Making sure DateTime.Now returns a GMT + 1 time I am using `DateTime.Now` to show something according to today's date, and when working locally (Malta, Europe) the times appear correctly (obviousl...
How to format a java.sql Timestamp for displaying?
How to format a java.sql Timestamp for displaying? How do I formate a java.sql Timestamp to my liking ? ( to a string, for display purposes)
- Modified
- 20 Jul at 23:14
Localizing Date Ranges
Localizing Date Ranges Does anyone know how to localize date ranges using C#? In particular, I want to generate "smart" date ranges, so that redundant information is eliminated. Here are some examples...
- Modified
- 22 Jul at 05:59
How do I improve the performance of code using DateTime.ToString?
How do I improve the performance of code using DateTime.ToString? In my binary to text decoding application (.NET 2.0) I found that the line: takes 33% of total processing time. Does anyone have any i...
- Modified
- 24 Jul at 08:17
Is there any difference between DateTime in c# and DateTime in SQL server?
Is there any difference between DateTime in c# and DateTime in SQL server? Is there any difference between DateTime in c# and DateTime in SQL server?
- Modified
- 25 Jul at 09:3
Get the date of next monday, tuesday, etc
Get the date of next monday, tuesday, etc I would like to find the date stamp of monday, tuesday, wednesday, etc. If that day hasn't come this week yet, I would like the date to be this week, else, ne...
How to loop between two dates
How to loop between two dates I have a calendar which passes selected dates as strings into a method. Inside this method, I want to generate a list of all the dates starting from the selected start da...