¡@

Home 

c# Programming Glossary: dt

Create Excel (.XLS and .XLSX) file from C# [closed]

http://stackoverflow.com/questions/151005/create-excel-xls-and-xlsx-file-from-c-sharp

set and table DataSet ds new DataSet New_DataSet DataTable dt new DataTable New_DataTable Set the locale for each ds.Locale.. System.Threading.Thread.CurrentThread.CurrentCulture dt.Locale System.Threading.Thread.CurrentThread.CurrentCulture.. new OleDbDataAdapter adptr.SelectCommand cmd adptr.Fill dt con.Close Add the table to the data set ds.Tables.Add dt Here's..

Displaying the build date

http://stackoverflow.com/questions/1600962/displaying-the-build-date

b i c_LinkerTimestampOffset DateTime dt new DateTime 1970 1 1 0 0 0 dt dt.AddSeconds secondsSince1970.. DateTime dt new DateTime 1970 1 1 0 0 0 dt dt.AddSeconds secondsSince1970 dt dt.AddHours TimeZone.CurrentTimeZone.GetUtcOffset.. DateTime dt new DateTime 1970 1 1 0 0 0 dt dt.AddSeconds secondsSince1970 dt dt.AddHours TimeZone.CurrentTimeZone.GetUtcOffset..

C# - Convert UTC/GMT time to local time

http://stackoverflow.com/questions/179940/c-sharp-convert-utc-gmt-time-to-local-time

its in UTC time you can just call ToLocalTime DateTime dt convertedDate.ToLocalTime This will give you the result you..

What is the worst gotcha in C# or .NET?

http://stackoverflow.com/questions/241134/what-is-the-worst-gotcha-in-c-sharp-or-net

a DateTime object and wrote something like this DateTime dt DateTime.Now dt.AddDays 1 return dt still today's date WTF The.. and wrote something like this DateTime dt DateTime.Now dt.AddDays 1 return dt still today's date WTF The intellisense.. like this DateTime dt DateTime.Now dt.AddDays 1 return dt still today's date WTF The intellisense documentation for AddDays..

Parse DateTime with timezone of form PST/CEST/UTC/etc

http://stackoverflow.com/questions/241789/parse-datetime-with-timezone-of-form-pst-cest-utc-etc

culture CultureInfo.CreateSpecificCulture nl BE DateTime dt DateTime.ParseExact 24 okt 08 21 09 06 CEST dd MMM yy HH mm.. with the time zone offset it will be OK. E.g. DateTime dt1 DateTime.ParseExact 24 okt 08 21 09 06 CEST .Replace CEST 2.. CEST .Replace CEST 2 dd MMM yy HH mm ss z culture DateTime dt2 DateTime.ParseExact 24 okt 08 21 09 06 CEST .Replace CEST 02..

How can I get the DateTime for the start of the week?

http://stackoverflow.com/questions/38039/how-can-i-get-the-datetime-for-the-start-of-the-week

public static DateTime StartOfWeek this DateTime dt DayOfWeek startOfWeek int diff dt.DayOfWeek startOfWeek if.. this DateTime dt DayOfWeek startOfWeek int diff dt.DayOfWeek startOfWeek if diff 0 diff 7 return dt.AddDays 1.. diff dt.DayOfWeek startOfWeek if diff 0 diff 7 return dt.AddDays 1 diff .Date Which is used thusly DateTime dt DateTime.Now.StartOfWeek..

Write Array to Excel Range

http://stackoverflow.com/questions/536636/write-array-to-excel-range

excerpt from method of mine which converts a DataTable the dt variable into an array and then writes the array into a Range.. array of strings to be placed at. object arr new object dt.Rows.Count dt.Columns.Count for int r 0 r dt.Rows.Count r DataRow.. to be placed at. object arr new object dt.Rows.Count dt.Columns.Count for int r 0 r dt.Rows.Count r DataRow dr dt.Rows..

Convert generic List/Enumerable to DataTable?

http://stackoverflow.com/questions/564366/convert-generic-list-enumerable-to-datatable

but i would like to have the posibility of DataTable dt DataTable whatever Thanks in advance. Kind Regards. Josema...