Search Results

Search found 48 results on 2 pages for 'mmmm'.

Page 1/2 | 1 2  | Next Page >

  • String Format for DateTime in C#

    - by SAMIR BHOGAYTA
    String Format for DateTime [C#] This example shows how to format DateTime using String.Format method. All formatting can be done also using DateTime.ToString method. Custom DateTime Formatting There are following custom format specifiers y (year), M (month), d (day), h (hour 12), H (hour 24), m (minute), s (second), f (second fraction), F (second fraction, trailing zeroes are trimmed), t (P.M or A.M) and z (time zone). Following examples demonstrate how are the format specifiers rewritten to the output. [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 String.Format("{0:F FF FFF FFFF}", dt); // "1 12 123 123" without zeroes String.Format("{0:t tt}", dt); // "P PM" A.M. or P.M. String.Format("{0:z zz zzz}", dt); // "-6 -06 -06:00" time zone You can use also date separator / (slash) and time sepatator : (colon). These characters will be rewritten to characters defined in the current DateTimeForma­tInfo.DateSepa­rator and DateTimeForma­tInfo.TimeSepa­rator. [C#] // date separator in german culture is "." (so "/" changes to ".") String.Format("{0:d/M/yyyy HH:mm:ss}", dt); // "9/3/2008 16:05:07" - english (en-US) String.Format("{0:d/M/yyyy HH:mm:ss}", dt); // "9.3.2008 16:05:07" - german (de-DE) Here are some examples of custom date and time formatting: [C#] // month/day numbers without/with leading zeroes String.Format("{0:M/d/yyyy}", dt); // "3/9/2008" String.Format("{0:MM/dd/yyyy}", dt); // "03/09/2008" // day/month names String.Format("{0:ddd, MMM d, yyyy}", dt); // "Sun, Mar 9, 2008" String.Format("{0:dddd, MMMM d, yyyy}", dt); // "Sunday, March 9, 2008" // two/four digit year String.Format("{0:MM/dd/yy}", dt); // "03/09/08" String.Format("{0:MM/dd/yyyy}", dt); // "03/09/2008" Standard DateTime Formatting In DateTimeForma­tInfo there are defined standard patterns for the current culture. For example property ShortTimePattern is string that contains value h:mm tt for en-US culture and value HH:mm for de-DE culture. Following table shows patterns defined in DateTimeForma­tInfo and their values for en-US culture. First column contains format specifiers for the String.Format method. Specifier DateTimeFormatInfo property Pattern value (for en-US culture) t ShortTimePattern h:mm tt d ShortDatePattern M/d/yyyy T LongTimePattern h:mm:ss tt D LongDatePattern dddd, MMMM dd, yyyy f (combination of D and t) dddd, MMMM dd, yyyy h:mm tt F FullDateTimePattern dddd, MMMM dd, yyyy h:mm:ss tt g (combination of d and t) M/d/yyyy h:mm tt G (combination of d and T) M/d/yyyy h:mm:ss tt m, M MonthDayPattern MMMM dd y, Y YearMonthPattern MMMM, yyyy r, R RFC1123Pattern ddd, dd MMM yyyy HH':'mm':'ss 'GMT' (*) s SortableDateTi­mePattern yyyy'-'MM'-'dd'T'HH':'mm':'ss (*) u UniversalSorta­bleDateTimePat­tern yyyy'-'MM'-'dd HH':'mm':'ss'Z' (*) (*) = culture independent Following examples show usage of standard format specifiers in String.Format method and the resulting output. [C#] String.Format("{0:t}", dt); // "4:05 PM" ShortTime String.Format("{0:d}", dt); // "3/9/2008" ShortDate String.Format("{0:T}", dt); // "4:05:07 PM" LongTime String.Format("{0:D}", dt); // "Sunday, March 09, 2008" LongDate String.Format("{0:f}", dt); // "Sunday, March 09, 2008 4:05 PM" LongDate+ShortTime String.Format("{0:F}", dt); // "Sunday, March 09, 2008 4:05:07 PM" FullDateTime String.Format("{0:g}", dt); // "3/9/2008 4:05 PM" ShortDate+ShortTime String.Format("{0:G}", dt); // "3/9/2008 4:05:07 PM" ShortDate+LongTime String.Format("{0:m}", dt); // "March 09" MonthDay String.Format("{0:y}", dt); // "March, 2008" YearMonth String.Format("{0:r}", dt); // "Sun, 09 Mar 2008 16:05:07 GMT" RFC1123 String.Format("{0:s}", dt); // "2008-03-09T16:05:07" SortableDateTime String.Format("{0:u}", dt); // "2008-03-09 16:05:07Z" UniversalSortableDateTime

    Read the article

  • FormatDate in Display Item Form Webpart

    - by H(at)Ni
    I've faced an issue that I wanted to display the date in the format of ('MMMM dd') that is retrieved from a sharepoint list in an arabic site collection. So, after googling this issue, I've found out that a possible solution to my poblem is using the function ddwrt:FormatDateTime that can be used as long as you'll include the following namespace xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" My purpose was solved by writing this line of code in my xsl code behind for the webpart : ddwrt:FormatDateTime(string(@StartDate),3073,'MMMM dd') but that worked only if the webpart is inserted into an English site . After trying to search but in vain, I started to use my guesses that ended up doing something like that: ddwrt:FormatDateTime(ddwrt:FormatDateTime(string(@StartDate),3073,'dd/MM/yyyy'), 3073, 'MMMM dd') And the cause of the problem was that sharepoint parses the date as 'MM/dd/yyyy' which I think could be related to server regional settings, so I had to force it to parse the date in arabic-Egypt format as 'dd/MM/yyyy' in order to get the correct 'Month Day' format as expected.

    Read the article

  • How can I fix intermittent iSight camera functionality on a Macbook Pro 5,2?

    - by Mmmm
    I have a Macbook Pro 5,2 laptop dual booting OSX and Ubuntu. The built-in iSight video camera works only sporadically. By that I mean that sometimes if I boot and try to use the camera it does not work (most of the time) but other times it does. I don't have good repeatable data regarding when it does vs. when it doesn't other than to say that it always seems to work right after I upgrade to a new Linux kernel with the Update Manager and reboot, but then eventually stops working again until I upgrade the kernel again. That is hard to test repeatably, so it's hard to know for sure that that is the case. This has happened consistently with every version of Ubuntu from 10.10 through 11.10. I can get around this by booting into the OS/X partition, since all of the hardware obviously works perfectly on that side of things, but it would be great if I could remain in Ubuntu and do the same thing. Thanks in advance for any inSights.

    Read the article

  • How to get the users set of date format pattern strings? (3 replies)

    I would like to get the current user's set of date format pattern strings as listed in the Control Panel regional settings applet. For my UK English system I see the following patterns listed: Short Date: dd/MM/yyyy dd/MM/yy d/M/yy d.M.yy yyyy MM dd Long Date: dd MMMM yyyy d MMMM yyyy If I use GetDateTimeFormats (d and D) the results match the expected patterns above, but of course they're the for...

    Read the article

  • How to get the users set of date format pattern strings? (3 replies)

    I would like to get the current user's set of date format pattern strings as listed in the Control Panel regional settings applet. For my UK English system I see the following patterns listed: Short Date: dd/MM/yyyy dd/MM/yy d/M/yy d.M.yy yyyy MM dd Long Date: dd MMMM yyyy d MMMM yyyy If I use GetDateTimeFormats (d and D) the results match the expected patterns above, but of course they're the for...

    Read the article

  • ASP.NET – Function to Fill Month, Date and Year into Dropdown lists

    - by SAMIR BHOGAYTA
    public void fillMonthList(DropDownList ddlList) { ddlList.Items.Add(new ListItem("Month", "Month")); ddlList.SelectedIndex = 0; DateTime month = Convert.ToDateTime("1/1/2000"); for (int intLoop = 0; intLoop { DateTime NextMont = month.AddMonths(intLoop); //ddlList.Items.Add(new ListItem(NextMont.ToString("MMMM"), NextMont.Month.ToString())); ddlList.Items.Add(new ListItem(NextMont.ToString("MMMM"), NextMont.ToString("MMMM"))); } } public void fillDayList(DropDownList ddlList) { ddlList.Items.Add(new ListItem("Day", "Day")); ddlList.SelectedIndex = 0; int totalDays = DateTime.DaysInMonth(DateTime.Now.Year, DateTime.Now.Month); for (int intLoop = 1; intLoop { ddlList.Items.Add(new ListItem(intLoop.ToString(), intLoop.ToString())); } } public void fillYearList(DropDownList ddlList) { ddlList.Items.Add(new ListItem("Year", "Year")); ddlList.SelectedIndex = 0; int intYearName = 1900; for (int intLoop = intYearName; intLoop { ddlList.Items.Add(new ListItem(intLoop.ToString(), intLoop.ToString())); } }

    Read the article

  • Translate jQuery UI Datepicker format to .Net Date format

    - by Michael Freidgeim
    I needed to use the same date format in client jQuery UI Datepicker and server ASP.NET code. The actual format can be different for different localization cultures.I decided to translate Datepicker format to .Net Date format similar as it was asked to do opposite operation in http://stackoverflow.com/questions/8531247/jquery-datepickers-dateformat-how-to-integrate-with-net-current-culture-date Note that replace command need to replace whole words and order of calls is importantFunction that does opposite operation (translate  .Net Date format toDatepicker format) is described in http://www.codeproject.com/Articles/62031/JQueryUI-Datepicker-in-ASP-NET-MVC /// <summary> /// Uses regex '\b' as suggested in //http://stackoverflow.com/questions/6143642/way-to-have-string-replace-only-hit-whole-words /// </summary> /// <param name="original"></param> /// <param name="wordToFind"></param> /// <param name="replacement"></param> /// <param name="regexOptions"></param> /// <returns></returns> static public string ReplaceWholeWord(this string original, string wordToFind, string replacement, RegexOptions regexOptions = RegexOptions.None) { string pattern = String.Format(@"\b{0}\b", wordToFind); string ret=Regex.Replace(original, pattern, replacement, regexOptions); return ret; } /// <summary> /// E.g "DD, d MM, yy" to ,"dddd, d MMMM, yyyy" /// </summary> /// <param name="datePickerFormat"></param> /// <returns></returns> /// <remarks> /// Idea to replace from http://stackoverflow.com/questions/8531247/jquery-datepickers-dateformat-how-to-integrate-with-net-current-culture-date ///From http://docs.jquery.com/UI/Datepicker/$.datepicker.formatDate to http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx ///Format a date into a string value with a specified format. ///d - day of month (no leading zero) ---.Net the same ///dd - day of month (two digit) ---.Net the same ///D - day name short ---.Net "ddd" ///DD - day name long ---.Net "dddd" ///m - month of year (no leading zero) ---.Net "M" ///mm - month of year (two digit) ---.Net "MM" ///M - month name short ---.Net "MMM" ///MM - month name long ---.Net "MMMM" ///y - year (two digit) ---.Net "yy" ///yy - year (four digit) ---.Net "yyyy" /// </remarks> public static string JQueryDatePickerFormatToDotNetDateFormat(string datePickerFormat) { string sRet = datePickerFormat.ReplaceWholeWord("DD", "dddd").ReplaceWholeWord("D", "ddd"); sRet = sRet.ReplaceWholeWord("M", "MMM").ReplaceWholeWord("MM", "MMMM").ReplaceWholeWord("m", "M").ReplaceWholeWord("mm", "MM");//order is important sRet = sRet.ReplaceWholeWord("yy", "yyyy").ReplaceWholeWord("y", "yy");//order is important return sRet; }

    Read the article

  • Get a culture specific list of month names

    - by erwin21
    A while ago I found a clever way to retrieve a dynamic culture specific list of months names in C# with LINQ. 1: var months = Enumerable.Range(1, 12) 2: .Select(i => new 3: { 4: Month = i.ToString(), 5: MonthName = new DateTime(1, i, 1).ToString("MMMM") 6: }) 7: .ToList(); .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } It’s fairly simple, for a range of numbers from 1 to 12 a DateTime object is created (year and day doesn’t matter in this case), then the date time object formatted to a full month name with ToString(“MMMM”). In this example an anonymous object is created with a Month and MonthName property. You can use this solution to populate your dropdown list with months or to display a user friendly month name.

    Read the article

  • Implementation code for GetDateFormat Win32 function

    - by morpheous
    I am porting some legacy code from windows to Linux (Ubuntu Karmic to be precise). I have come across a Win32 function GetDateFormat(). The statements I need to port over are called like this: GetDateFormat(LOCALE_USER_DEFAULT, 0, &datetime, "MMMM", 'January', 31); OR GetDateFormat(LOCALE_USER_DEFAULT, 0, &datetime, "MMMM", 'May', 30); Where datetime is a SYSTEMTIME struct. Does anyone know where I can get the code for the function - or failing that, tips on how to "roll my own" equivalent function?

    Read the article

  • Calling server side method as filling value inside a textbox from calendar extender

    - by Dharmendra Singh
    I have a text box which i m filling of date from the calendar extender and the code is as below:- <label for="input-one" class="float"><strong>Date</strong></label><br /> <asp:TextBox ID="txtDate" runat="server" CssClass="inp-text" Enabled="false" AutoPostBack="true" Width="300px" ontextchanged="txtDate_TextChanged"></asp:TextBox> <asp:ImageButton ID="btnDate2" runat="server" AlternateText="cal2" ImageUrl="~/App_Themes/Images/icon_calendar.jpg" style="margin-top:auto;" CausesValidation="false" onclick="btnDate2_Click" /> <ajaxToolkit:CalendarExtender ID="calExtender2" runat="server" Format="dddd, MMMM dd, yyyy" OnClientDateSelectionChanged="CheckDateEalier" PopupButtonID="btnDate2" TargetControlID="txtDate" /> <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="txtDate" ErrorMessage="Select a Date" Font-Bold="True" Font-Size="X-Small" ForeColor="Red"></asp:RequiredFieldValidator><br /> Javascript code is :- function CheckDateEalier(sender, args) { sender._textbox.set_Value(sender._selectedDate.format(sender._format)) } My requirement is that as the date is entered in to the textbox, I want to call this method: public void TimeSpentDisplay() { string date = txtDate.Text.ToString(); DateTime dateparsed = DateTime.ParseExact(date, "dddd, MMMM dd, yyyy", null); DateTime currentDate = System.DateTime.Now; if (dateparsed.Date > currentDate.Date) { divtimeSpent.Visible = true; } if (dateparsed.Date < currentDate.Date) { divtimeSpent.Visible = true; } if (dateparsed.Date == currentDate.Date) { divtimeSpent.Visible = false; } } Please help me that how i achieve this as i m calling this method inside txtDate_TextChanged method but the event is not firing as the text is changed inside the textbox. Please suggest how I can achieve this or give me an alternate idea to fulfill my requirement.

    Read the article

  • Sharepoint 2007 calculated Date field shows incorrectly in non-US region

    - by Proforce
    If a SharePoint user (with Regional Settings set to UK) views a calculated date field in a View details form, the field shows incorrectly. I am using: ddwrt:FormatDateTime(string(@RenewalDate), 1033, 'dd MMMM yyyy') Which shows 04 January 2010 for 01/04/2010 and, doesnt show unresolvable dates such as 31-Dec-2010. This applies even with a simnple =[Modified] formula The Server is set up in the US for that locale.

    Read the article

  • Show/Hide button (text) for Accordion

    - by Kevin
    Have an accordion with a "view" button to open close the accordion panel (using jQuery Tools), but I would like to have dynamic text that says "show/hide" depending on the state... Here is the code for the accordion in asp.NET <div id="accordion"> <% foreach (var eventModel in ViewModel) { %> <% var isNewMonth = eventModel.Date.Month != previousMonth; %> <% if (isNewMonth && previousMonth > 0) { %></table></div><% } %> <% previousMonth = eventModel.Date.Month; %> <% if (isNewMonth) { %> <h2><%= string.Concat(eventModel.Date.ToString("MMMM"), " ", eventModel.Date.Year) %> <span style="float:right;"><a href="#" class="button blue small">View</a></span></h2> <div class="pane" style="display:block"> <table id="listTable" width="100%" cellpadding="3" cellspacing="0" border="0"> <tr align="left" valign="top"><th align="left" valign="top">Date</th><th align="left" valign="top">Event</th><th align="left" valign="top">Event Type</th></tr> <% } %> <tr align="left" valign="top"><td align="left" valign="top"><b><span id="date" style="float:left;"> <%= string.Concat(eventModel.Date.ToString("MMMM"), " ", eventModel.Date.Day, " </span><span id='day' style='float:left'>" + eventModel.Date.DayOfWeek + "</span> ")%></b></td><td align="left" valign="top" ><%= Html.ActionLink(eventModel.Name.Truncate(40), "event", "register", new { id = eventModel.Id }, null)%></td><td align="left" valign="top"><%= string.Concat(" ", eventModel.Sport)%></td></tr> <% } %> <% if (ViewModel.Count > 0) { %></table></div><% } %> </div> Here is the initialization script using jQuery: $(function() { $("#accordion").tabs("#accordion div.pane", {tabs: 'h2', effect: 'slide', initialIndex: 0}); $(".small").click(function() { moveToTop(); }); });

    Read the article

  • Why does Joda time change the PM in my input string to AM?

    - by Tree
    My input string is a PM time: log(start); // Sunday, January 09, 2011 6:30:00 PM I'm using Joda Time's pattern syntax as follows to parse the DateTime: DateTimeFormatter parser1 = DateTimeFormat.forPattern("EEEE, MMMM dd, yyyy H:mm:ss aa"); DateTime startTime = parser1.parseDateTime(start); So, why is my output string AM? log(parser1.print(startTime)); // Sunday, January 09, 2011 6:30:00 AM

    Read the article

  • Override Locale Date with custom setings.

    - by Frank Developer
    Aside from the GL Support, is there a way to override locale settings with custom values for month and day when using mmm-dd-yyyy, modified spanish examples: Jan = ENE, Aug = AGO, or long dates (mmmm) January = ENERO, August = AGOSTO, or (dddd) Monday = LUNES, Thursday = JUEVES, etc.?

    Read the article

  • how to bind repeater control as message threading

    - by Shalin Gajjar
    i have crm application. i have one difficulties that how i bind repeater control as message threading. like first thread as question and second thread as answer of that question. if user asked multiple question then first,second,.. threads as question and.as it is like message chatting... for keeping data from database i use this stored procedure: set ANSI_NULLS ON set QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[ViewMessageThreads] (@inquiry_id varchar(50)) AS BEGIN SET NOCOUNT ON; select i.body as master_body, h.body as history_body, q.body as question_body, q.Created_date as question_timestamp, a.body as answer_body, a.Created_date as answer_timestamp, t.Type_name as user_type from tbl_Inquiry_History i left join tbl_Inquiry_master h on h.Inquiry_id=i.Inquiry_id left join tbl_Question q on q.Inquiry_id=i.Inquiry_id left join tbl_Answer a on a.Question_id=q.Inquiry_id left join tbl_User_master u on u.Id=i.User_id left join tbl_Login_master l on l.Id=u.User_id left join tbl_Type t on t.Id = l.type_id where (i.Inquiry_id=@inquiry_id) END and this gives me result as: master_body history_body question_body question_t.. answer_body answer_t.. user_type __________________________________________________________________________________________ question 1 NULL question 1 2005-03-14... NULL NULL User question 1 NULL question 2 2005-03-14... NULL NULL User and i include this design source of repeater: <asp:Repeater ID="Repeater_Inquiry_Messages" runat="server"> <ItemTemplate> <table id="ctl00_ContentPlaceHolder1_dl_ticketmsg" cellspacing="0" border="0" style="width:100%;border-collapse:collapse;"> <tbody><tr> <td style="background-color:#F5F5FF;"> <table cellpadding="0" cellspacing="0" border="0"> <tbody><tr> <td class="header"> <span id="ctl00_ContentPlaceHolder1_dl_ticketmsg_ctl00_lbl_msg_no"><%#Container.ItemIndex+1 %></span></td> <td class="normaltext" valign="bottom"> <span id="ctl00_ContentPlaceHolder1_dl_ticketmsg_ctl00_lbl_tagline">Message By <b><asp:Label ID="lbl_user_t" runat="server" Text='<%#Eval("user_type")%>'/></b> on <asp:Label ID="lbldatetime" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "question_timestamp","{0:ddd, dd MMMM yyyy}")%>'/></span></td> </tr> <tr> <td class="header"> &nbsp;</td> <td class="normaltext" valign="bottom"> <b>Message :</b><br> <span id="ctl00_ContentPlaceHolder1_dl_ticketmsg_ctl00_Label1"><asp:Label ID="lbl_inquiry_desc" runat="server" Text='<%#Eval("question_body")%>'/></span></td> </tr> </tbody></table> </td> </tr> </tbody></table> </ItemTemplate> <SeparatorTemplate> <table> <tr> <td style="height:3px"></td> </tr> </table> </SeparatorTemplate> <ItemTemplate> <table id="ctl00_ContentPlaceHolder1_dl_ticketmsg1" cellspacing="0" border="0" style="width:100%;border-collapse:collapse;"> <tbody><tr> <td style="background-color:#F5F5FF;"> <table cellpadding="0" cellspacing="0" border="0"> <tbody><tr> <td class="header"> <span id="ctl00_ContentPlaceHolder1_dl_ticketmsg1_ctl00_lbl_msg_no"><%#Container.ItemIndex+1 %></span></td> <td class="normaltext" valign="bottom"> <span id="ctl00_ContentPlaceHolder1_dl_ticketmsg1_ctl00_lbl_tagline">Message By <b><asp:Label ID="Label1" runat="server" Text='<%#Eval("user_type")%>'/></b> on <asp:Label ID="Label2" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "answer_timestamp","{0:ddd, dd MMMM yyyy}")%>'/></span></td> </tr> <tr> <td class="header"> &nbsp;</td> <td class="normaltext" valign="bottom"> <b>Message :</b><br> <span id="ctl00_ContentPlaceHolder1_dl_ticketmsg1_ctl00_Label1"><asp:Label ID="Label3" runat="server" Text='<%#Eval("answer_body")%>'/></span></td> </tr> <tr> <td class="header"> &nbsp;</td> <td class="normaltext" valign="bottom"> <b></b> </td> </tr> </tbody></table> </td> </tr> </tbody></table> </ItemTemplate> </asp:Repeater> how ever this gives me only question thread while i commenting up this second message thread. ----------------------------------------Updated--------------------------------------- please help me.. ---------------------------------------Updated---------------------------------------- Server Error in '/OmInvestmentStockMarketing_new' Application. Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS1026: ) expected Source Error: Line 162: <span id="ctl00_ContentPlaceHolder1_dl_ticketmsg_ctl00_lbl_msg_no"><%#Container.ItemIndex+1 %></span></td> Line 163: <td class="normaltext" valign="bottom"> Line 164: <span id="ctl00_ContentPlaceHolder1_dl_ticketmsg_ctl00_lbl_tagline">Message By <b><asp:Label ID="lbl_user_t" runat="server" Text='<%# If(Eval("cargo2").ToString() Is "Admin", "You", Eval("cargo2"))%>'/></b> Line 165: on <asp:Label ID="lbldatetime" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"cargo1","{0:ddd, dd MMMM yyyy}")%>'/></span></td> Line 166: </tr> Source File: c:\Documents and Settings\Vishal\My Documents\Visual Studio 2005\WebSites\OmInvestmentStockMarketing_new\Admin\OWM_Inquiry.aspx Line: 164 Show Detailed Compiler Output: Show Complete Compilation Source: Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053

    Read the article

  • output Caching and postback

    - by Costa
    Hi If you have a button and a text box in a page, and the page is cached on the server. Put a breakpoint at page_load and run If you click the button, the Page_load breakpoint is visited only for first click. I am trying to get some explanation rather than "Wellll....ahhh mmmm it is a postback!!" I am expecting that the breakpoint will not be visited at all, it is a cached page. thanks

    Read the article

  • Including Build Date strings in a C# project

    - by David Rutten
    I'd like to hard code the build date into my application (DD-mmmm-YYYY), but how do I embed this constant into the code? I thought perhaps I could make a pre-build event that executes a *.bat file that updates a textfile which is resourced, but it sounds pretty involved. What's the best approach?

    Read the article

  • how to parse string into a date pattern using dojo

    - by Dojouser
    Hi, I have a value as '05/17/2010' I would like to get it as May 17, 2010 by using dojo.date.locale.I have tried using the dojo.date.locale.parse as follows : x = '05/17/2010' var x= dojo.date.locale.parse(x, {datePattern: "MM/dd/yyyy", selector: "date"}); alert(x) This doesnt give me the desired date pattern I also tried replacing the pattern as datePattern : "MMMM d, yyyy" but it returns me null. Any help highly appreciated. Thanks

    Read the article

  • Is my Joda Time format pattern incorrect to produce a `T` and `Z` inside the parsed DateTime output?

    - by Tree
    Using Joda Time's pattern syntax below, this input string: Sunday, January 09, 2011 6:15:00 PM becomes this datetime: 2011-01-09T06:15:00.000Z Code: String start = "Sunday, January 09, 2011 6:15:00 PM"; DateTimeFormatter parser1 = DateTimeFormat.forPattern("EEEE, MMMM dd, yyyy H:mm:ss aa"); DateTime startTime = parser1.parseDateTime(start); Is this format pattern incorrect? If not, what are the T and Z doing inside the DateTime output? 2011-01-09T06:15:00.000Z

    Read the article

  • NSDateFormatter always return 2010-12-31 23:00:00 +0000

    - by Janky
    Hello! I'm using this code to format a date from a string: NSDateFormatter *dateFormat = [[NSDateFormatter alloc]init]; [dateFormat setDateFormat:@"EEEE, dd MMMM yyyy"]; NSDate *dateStart = [dateFormat dateFromString:[thisEvent dateEvent]]; [thisEvent dateEvent] contains this date: Saturday, 09 April 2011 I don't know why dateStart contains 2010-12-31 23:00:00 +0000 where I'm wrong? Thank You!!

    Read the article

  • Formatting Dates, Times and Numbers in ASP.NET

    Formatting is the process of converting a variable from its native type into a string representation. Anytime you display a DateTime or numeric variables in an ASP.NET page, you are formatting that variable from its native type into some sort of string representation. How a DateTime or numeric variable is formatted depends on the culture settings and the format string. Because dates and numeric values are formatted differently across cultures, the .NET Framework bases its formatting on the specified culture settings. By default, the formatting routines use the culture settings defined on the web server, but you can indicate that a particular culture be used anytime you format. In addition to the culture settings, formatting is also affected by a format string, which spells out the formatting details to apply. The .NET Framework contains a bounty of format strings. There are standard format strings, which are typically a single letter that applies detailed formatting logic. For example, the "C" format specifier will format a numeric type as a currency value; the "Y" format specifier displays the month name and four-digit year of the specified DateTime value. There are also custom format strings, which display a apply a very specific formatting rule. These custom format strings can be put together to build more intricate formats. For instance, the format string "dddd, MMMM d" displays the full day of the week name followed by a comma followed by the full name of the month followed by the day of the month. For more involved formatting scenarios, where neither the standard or custom format strings cut the mustard, you can always create your own formatting extension methods. This article explores the standard format strings for dates, times and numbers and includes a number of custom formatting methods I've created and use in my own projects. There's also a demo application you can download that lets you specify a culture and then shows you the output for the standard format strings for the selected culture. Read on to learn more! Read More >

    Read the article

  • Which tools you use for development in your company?…Please be exact [closed]

    - by predrag.music
    If you are a professional php/(my/postgre/?)sql/? developer and working in a professional team ... I would like to know which tools you use for development in your company. I do not care which tool is better or worse, but "which tools you use", if it is not a TOP SECRET :) For example, these are just some of the tools i/we use (first those used most (in general)): Pen, paper lots of cofee, cola ... let me think ... mmmm ... yeah more cofee :) All kinds of books (a lots of books) OS: Win / MacOS X Server: Hosted (CentOS )/ At work Mac OS X Dev server: XAMPP / MAMP / LAMP Editor: Notepad++ IDE: Netbeans / Zend Studio / Eclipse Version Control System: Mercurial / SVN FTP: Filezilla mostly / ... Passwords: KeePass js / ajax: jQuery / pure js / jQuery UI Framework:CI / Zend / pure php Database: MySQL / Other ORM: Framework layer db (Not an ORM I know but...) / Doctrine (2) / no ORM Debugging: Xdebug (PHP) / firebug (ajax/js/html/css/...) / framework profiler (stuff) / ... (x) Dreaming: About... Thinking: Not about chaos in ? direction .... n Anything else that comes to mind n+1 Zilion other stuff i know but i can't remember ... 8 some other stuff i (don't) remember i forgot, give up, delete, lost, said to myself never again, i haven't had time stuff, have on computer stuff but can't find or don't even know i have it on my computer at least 2-3 or more times, stuff I said to myself i'll check later and never checked again for all sort of "perfectly justified" reasons (time, memory, wife :), whatever,...), ... what is the reason i'm asking this?:) 8 and beyond looking forward to see a lot of answers ?

    Read the article

  • Is this table replicated?

    - by fatherjack
    Another in the potentially quite sporadic series of I need to do ... but I cant find it on the internet. I have a table that I think might be involved in replication but I don't know which publication its in... We know the table name - 'MyTable' We have replication running on our server and its replicating our database, or part of it - 'MyDatabase'. We need to know if the table is replicated and if so which publication is going to need to be reviewed if we make changes to the table. How? USE MyDatabase GO /* Lots of info about our table but not much that's relevant to our current requirements*/ SELECT * FROM sysobjects WHERE NAME = 'MyTable' -- mmmm, getting there /* To quote BOL - "Contains one row for each merge article defined in the local database. This table is stored in the publication database.replication" interesting column is [pubid] */ SELECT * FROM dbo.sysmergearticles AS s WHERE NAME = 'MyTable' -- really close now /* the sysmergepublications table - Contains one row for each merge publication defined in the database. This table is stored in the publication and subscription databases. so this would be where we get the publication details */ SELECT * FROM dbo.sysmergepublications AS s WHERE s.pubid = '2876BBD8-3D4E-4ED8-88F3-581A659E8144' -- DONE IT. /* Combine the two tables above and we get the information we need */ SELECT s.[name] AS [Publication name] FROM dbo.sysmergepublications AS s INNER JOIN dbo.sysmergearticles AS s2 ON s.pubid = s2.pubid WHERE s2.NAME = 'MyTable' So I now know which

    Read the article

  • asp.net rangevalidator for calendar extender entries gives problems in safari

    - by Robin Baralla
    Hi there, I have the following scenario: arrival and departure dates have to be selected on a form, through 2 textboxes with a calendar extender each. I validate the entries to check that no date before today is selected and to check that the departure is after the arrival. I used a rangevalidator and a comparevalidator. In IE, Firefox and Opera it is working fine, in Safari (on windows) however both the validators go off even on entries that should be accepted. It makes me suspect that the date format dd/MM/yyyy causes trouble for Safari. (the dd/MMMM/yyyy also gave the same troubles in the other browsers, probably due to the dependency on UIculture) The code is:   The range validator gets its values in code behind on Page_load RangeValidator1.MinimumValue = DateTime.Now.AddDays(1).ToShortDateString(); RangeValidator1.MaximumValue = DateTime.Now.AddMonths(12).ToShortDateString(); Does anybody have any suggestions on how to solve this problem with safari? best regards, Robin

    Read the article

1 2  | Next Page >