CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
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">
by Rick Strahl   November 28, 2011 @ 5:21am
Tags: Time, jQuery, Input
323 Views
no comments
 
C#
//using System.Globalization;
CultureInfo culture = new CultureInfo("en-AU");
DateTime week_start = Convert.ToDateTime("27/07/2011", culture);
by Egli   August 01, 2011 @ 12:27am
128 Views
no comments
 
XML
<!--Place this under the <system.web> node-->
<httpRuntime executionTimeout="1200" maxRequestLength="30720" />
by Egli   July 25, 2011 @ 5:41pm
139 Views
no comments
 
C#
// 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
by Egli   July 24, 2011 @ 10:54pm
97 Views
no comments
 
C#
public static class TimeZoneInfoHelper
    {
        public static TimeSpan FindUtcOffsetByTimeZone(TimeZoneInfo timeZone)
        {
            var converted = FindCurrentDateTimeByTimeZoneInfo(timeZone);
 
            return converted.HasValue ? timeZone.GetUtcOffset(converted.Value) : TimeSpan.Zero;
        }
 
by Jason Rowe   March 28, 2011 @ 7:23pm
84 Views
no comments
 
C#
Object:
            [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:MM/dd/yyyy}")] 
View:
                        <%= Html.EditorFor(model => model.suspension.DateBegin)%>
by cn982mj   December 16, 2010 @ 7:24am
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;
by Thiago Pedro   August 27, 2010 @ 8:07am
330 Views
1 comments
 
C#
public DateTime getIndianStandardTime()
{
 TimeZoneInfo IND_ZONE=TimeZoneInfo.FindSystemTimeZoneById("India Standard Time");
 return TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, IND_ZONE);
}
by pandiyachendur   July 16, 2010 @ 2:17am
268 Views
no comments
 
SQL
'1/1/2000 1:30 AM' != '1/1/2000 1:31 AM'
 
-- ///
 
DECLARE @x datetime
SET @x = GETDATE()
SET @x = CONVERT(varchar, @x, 101)
 
-- ///
by Jerry Nixon   March 05, 2010 @ 8:53am
Tags: SQL, DateTime
489 Views
no comments
 
C#
// 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
by KMS   December 23, 2009 @ 9:17am
Tags: DateTime
448 Views
no comments
 
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate