Format:
Recent snippets matching tags of Time
(function ($) { $.fn.timeKeys = function (options) { /// <summary> /// Attaches a set of hotkeys to time fields /// + Add minute - subtract minute /// H Subtract Hour R Add houR /// ? Show keys /// </summary> /// <param name="options" type="object">
323 Views
no comments
//using System.Globalization; CultureInfo culture = new CultureInfo("en-AU"); DateTime week_start = Convert.ToDateTime("27/07/2011", culture);
128 Views
no comments
<!--Place this under the <system.web> node--> <httpRuntime executionTimeout="1200" maxRequestLength="30720" />
139 Views
no comments
// create date time 2008-03-09 16:05:07.123 DateTime dt = new DateTime(2008, 3, 9, 16, 5, 7, 123); String.Format("{0:y yy yyy yyyy}", dt); // "8 08 008 2008" year String.Format("{0:M MM MMM MMMM}", dt); // "3 03 Mar March" month String.Format("{0:d dd ddd dddd}", dt); // "9 09 Sun Sunday" day String.Format("{0:h hh H HH}", dt); // "4 04 16 16" hour 12/24 String.Format("{0:m mm}", dt); // "5 05" minute String.Format("{0:s ss}", dt); // "7 07" second String.Format("{0:f ff fff ffff}", dt); // "1 12 123 1230" sec.fraction
97 Views
no comments
public static class TimeZoneInfoHelper { public static TimeSpan FindUtcOffsetByTimeZone(TimeZoneInfo timeZone) { var converted = FindCurrentDateTimeByTimeZoneInfo(timeZone); return converted.HasValue ? timeZone.GetUtcOffset(converted.Value) : TimeSpan.Zero; }
84 Views
no comments
Object:
[DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:MM/dd/yyyy}")]
View:
<%= Html.EditorFor(model => model.suspension.DateBegin)%>
235 Views
no comments
//procedure para aguardar um determinado tempo - não trava o programa como o sleep
procedure Delay(MSec: Cardinal);
var
Start: Cardinal;
begin
Start := GetTickCount;
repeat
Application.ProcessMessages;
until (GetTickCount - Start) >= MSec;
end;
330 Views
1 comments
public DateTime getIndianStandardTime() { TimeZoneInfo IND_ZONE=TimeZoneInfo.FindSystemTimeZoneById("India Standard Time"); return TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, IND_ZONE); }
268 Views
no comments
'1/1/2000 1:30 AM' != '1/1/2000 1:31 AM' -- /// DECLARE @x datetime SET @x = GETDATE() SET @x = CONVERT(varchar, @x, 101) -- ///
489 Views
no comments
// create date time 2008-03-09 16:05:07.123 DateTime dt = new DateTime(2008, 3, 9, 16, 5, 7, 123); String.Format("{0:y yy yyy yyyy}", dt); // "8 08 008 2008" year String.Format("{0:M MM MMM MMMM}", dt); // "3 03 Mar March" month String.Format("{0:d dd ddd dddd}", dt); // "9 09 Sun Sunday" day String.Format("{0:h hh H HH}", dt); // "4 04 16 16" hour 12/24 String.Format("{0:m mm}", dt); // "5 05" minute String.Format("{0:s ss}", dt); // "7 07" second String.Format("{0:f ff fff ffff}", dt); // "1 12 123 1230" sec.fraction
448 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
