Date Format Issue With Sharepoint DateTime Control

I Have a Web part where in create child control I am creating my controls.
Where I have SharePoint date time control and I want to change the format of the control on change in the browser languages settings.
Currenlt I am doing it by setting localID of the control as  DateTime.LocalID=Thread.CurrentThread.CurrentCulture.LCID.
But it is not working , It always take UK format.
Please suggest ....!!!!
Thanks.

Check this
http://www.matdesmarais.com/2011/12/changing-the-date-display-format-in-sharepoint-2010/

Similar Messages

  • Uk date format issue with ASP and Access Database

    I have an Asp form which updates records in an Access
    database. Problem is
    that the date format in the database record is dd/mm/yyyy
    (UK), when
    the record is displayed on the form it is mm/dd/yyyy(US)
    which after I
    update the record in the database the date has changed to the
    new format.
    I have tried everything I can to change the format but to no
    avail...anyone any ideas how I can resolve this issue?
    Thanks
    Steve

    stevo.s wrote:
    > Hi
    >
    > I have tried changing the format on the date field on
    the server behaviours
    > panelto ddmmyyy. Also have tried to set the form field
    format to ddmmyy. I have
    > also tried to use a function I got from a posting
    somehwere on the net to no
    > avail. <%function ddmmyyyy(varDate)
    > ddmmyyyy = Day(DateValue(varDate)) & "/" &
    Month(DateValue(varDate))
    > & "/" & Year(DateValue(varDate))
    > end function
    >
    > I believe that this is a recognised issue with
    Dreamweaver and Access but
    > can't seem to grasp the work around! Problem being I am
    teaching myself through
    > books and internet articles and can be weeks at a time
    without being able to
    > look at the issue..each time I come back to it it is
    like starting all over
    > again! I was hoping that somewhere out there there is a
    simple solution the
    > issue perhaps a date picker with the built in
    functionality to address the
    > issue...I am keen to understand how to deal with the
    issue rather than just
    > change my database date field to fudge the problem as I
    am in the UK and when I
    > eventually start to use the application I would like
    there to be some
    > consistency with dates and that users are familiar with
    the format.
    >
    > Any help gratefully received!
    Its not Dreamweaver, or Access, its your servers locale, its
    set to US
    format, not the UK.
    On your page at the top use:
    <% Session.LCID = 2057 %>
    This will force the page into using UK formatted dates. Use
    it on any
    page that needs to format the page correctly.
    Dooza
    Posting Guidelines
    http://www.adobe.com/support/forums/guidelines.html
    How To Ask Smart Questions
    http://www.catb.org/esr/faqs/smart-questions.html

  • Date Format Issue with Interactive Form

    Hi, here is the scenario:
    -We just upgraded to SP17 from SP15
    -I'm using Livecycle Designer 8.0
    When we were on SP15, this was not an issue.  I was wondering if anyone encountered this problem and if so, if there is a workaround?
    I create an interactive form to start a guided procedure process.  Im passing the data from my desktop Interactive form to another callable object in GP to send an email with the PDF attached.  This all works correclty. 
    My date/time fields are set to type DATE with a display pattern of YYYY-MM-DD.  When I create the form in the GP administrator to my desktop and open the PDF, the date format is correct. However, when I submit the form to start the process, the incomming date fields to be mapped to my second Callable Object have change in format from "2009-02-18" to  "Wed Feb 18 00:00:00 EST 2009".
    This is true in the new form I receive via email, and also in NWA->monitoring->guided procedures when I check the instances.  The input mapping is already set to the false formatting.
    When I open the form from the second callable object with the incorrect date format (in designer), the date's display patterns are set to YYYY-MM-DD but are not being displayed as such.
    New discovery....I tried to create a Business Logic callable object and format the date.  I created a string input and date output and mapped them accordingly.  When I perform a "TEST" from the design time and use the input "Wed Feb 18 00:00:00 EST 2009", the string is automatically converted to 18/02/2009 in the output, which is what I want to occur.  The only problem is when I run the actual process, the same "Wed Feb 18 00:00:00 EST 2009" is being output instead of the 18/02/2009 in the TEST.
    Anyone have any ideas?
    Thanks.
    Edited by: Warren Clements on Feb 26, 2009 2:20 AM

    This test program might help...
    import java.util.*;
    import java.text.*;
    public class ExpandYear
        public static void main(String[] args) throws ParseException
         SimpleDateFormat sdf_2dyear = new SimpleDateFormat("MM/dd/yy");
         SimpleDateFormat sdf_4dyear = new SimpleDateFormat("MM/dd/yyyy");
         String test1 = "3/21/00";
         System.out.println("test1: " + test1 + " to : " +
                      sdf_4dyear.format(sdf_2dyear.parse(test1)));
         String test2 = "4/9/99";
         System.out.println("test2: " + test2 + " to : " +
                      sdf_4dyear.format(sdf_2dyear.parse(test2)));

  • Date Format Issue with Pre-Insert trigger

    I have created a form wherein creation_date and last_update_date are columns in a table that needs to be populated with sysdate (in format mm/dd/yyyy hh:mi:ss am) at time of saving.
    In pre-insert triiger, if I assign date as follows , it works:
    :creation_date=sysdate;
    However this creates date in format yyyy/mm/dd.
    I would like to set it in format mm/dd/yyyy hh:mi:ss am.
    How can this be done-I tried using to_date and to_char but wont work.
    Any ideas?

    hi
    u may try this too.
    when-new-form-instance trigger:
    set_application_property(PLSQL_date_FORMAT,'DDMMYYYY HH12:MI:SS');
    set_application_property(BUILTIN_date_FORMAT,'DDMMYYYY HH12:MI:SS');
    forms_ddl('ALTER SESSION SET NLS_date_FORMAT=''DDMMYYYY HH12:MI:SS'''); sarah

  • SQLLDR date format issue with AM/PM

    Hello Experts,
    I am unable to load data into my table in oracle 11G using sql loader.
    I will put my problem in a simpler way.
    SQL> sho parameter nls_date_format
    nls_date_format                      string      DD-MM-YYYY HH12:MI:SS AM
    SQL>
    SQL> desc hero
    Name                                      Null?    Type
    DAT_1                                              TIMESTAMP(6)
    hero.ctl
    LOAD DATA                                                                      
    INFILE 'hero.dat'                                                              
    INTO TABLE HERO                                                                
    FIELDS TERMINATED BY ','                                                       
    TRAILING NULLCOLS                                                              
       DAT_1     DATE "DD/MM/YYYY HH12:MI:SS AM"                                                                 
    hero.log
       Column Name                  Position   Len  Term Encl Datatype
    DAT_1                               FIRST     *   ,       DATE DD/MM/YYYY HH12:MI:SS AM
    Record 1: Rejected - Error on table HERO, column DAT_1.
    ORA-01858: a non-numeric character was found where a numeric was expected
    Table HERO:
      0 Rows successfully loaded.
      1 Row not loaded due to data errors.
      0 Rows not loaded because all WHEN clauses were failed.
      0 Rows not loaded because all fields were null.
    hero.bad
    "28/2/2011  11:48:00 PM"Constraints :-
    1. The data from the flat file cannot be formatted / edited / changed.
    2. The table's datatypes cannot be altered.
    Regards,
    Valli

    The problem is that you are trying to put a DATE into a TIMESTAMP column. The DATE needs converting to a timestamp. This would be easier if you used external tables as you could do the conversion on the fly when doing an insert...select... from the external table, rather than relying on the outdated SQL*Loader functionality.

  • How to call sharepoint datetime control on date changed in javascript?

    Hi,
    Can any body help me to call sharepoint datetime control  date changed event in javascript.? Im trying to show the date on dateTimeControl2 based on dateTimeControl1 on dateChanged event (not submit ) ie, when mouse leaves from the first date control
    , next date control will update 1 year from first date control.
    <SharePoint:DateTimeControl ID="effectiveDate"
    CssClassTextBox="form-control"
    runat="server" DateOnly="true"
    OnValueChangeClientScript="val_create_cca_onchange()"
    DatePickerFrameUrl="<%$SPUrl:~sitecollection/_layouts/15/iframe.aspx %>" />
    and my js function is..
    function val_create_cca_onchange( ) {
    var dt = new Date();
    var val_effective_date = document.getElementById("<%= effectiveDate.ClientID %>");
    var dt2 = dt.getDate(val_effective_date);
    var month2 = dt.getMonth(val_effective_date) + 1;
    var year2 = dt.getFullYear(val_effective_date) + 1;
    var dateUpdate = dt2 + '/' + month2 + '/' + year2;
    document.getElementById("<%= endDate.ClientID %>").innerText = dateUpdate;
    Thanks in advance.

    Your script is correct except id in the url. You need to pass the url like 
    <a href="javascript:OpenPopUpPage(‘/sites/wm/Lists/WorkItems/EditForm.aspx?ID={@ID}’)">
    Edit Item</a>
    http://jimecox.wordpress.com/2011/08/02/url-stings-in-sharepoint-2010-to-launch-edit-forms/

  • SharePoint DateTime Control "Hour, Minute, and Second parameters describe an un-representable DateTime"

    I am facing a strange behavior from SharePoint:DateTime control.
    I have a webpart containing couple of fields along with datetime control. If I leave this page inactive for a while and then click submit, an exception is thrown stating that "Hour, Minute, and Second parameters describe an un-representable DateTime". 

    Hi,
    According to your post, my understanding is that you got datetime control error.
    The problem may be lied in the Time component. You can disable the time component and go for a date only rendering of the control by setting
    DateTimeField.DateOnly = true.
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/64c05363-fd7e-49bb-8239-c93ec78172b6/datetime-control-using-basefieldcontrol?forum=sharepointgeneralprevious
    what’s  more, you can the ULS log to see the details errors.
    For SharePoint 2013, by default, ULS log is at
    C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\LOGS
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • Issues with SharePoint 2013 after upgrading from windows 2012 to 2012 r2

    We have a Sharepoint with Sp1 environment on windows 2012. Recently we upgraded the windows 2012 to 2012 r2. After the upgrade sharepoint environment is completely unstable.
    At first all the sites returned 401 errors. After resolving by resetting the object cache accounts the sites are back.
    Then i see that none of the performance point dashboards work. I figured that claims to windows token service is defaulted to local system account. I previously configured with a domain account. I reconfigured to work with domain account. 
    All the dashboard pages throw error.
           Some Error logs:Failed to get document content data. System.ComponentModel.Win32Exception (0x80004005): Cannot complete this function     at Microsoft.SharePoint.SPSqlClient.GetDocumentContentRow 
    Application error when access /Dashboards/Performance Dashboard/Main.aspx, Error=The EnableScriptGlobalization property cannot be changed during async postbacks or after the Init event.   at System.Web.UI.ScriptManager.set_EnableScriptGlobalization(Boolean
    value)    
      4.  I tried to create a new dashboard and this time the performancepoint designer wont launch. After some troubleshooting i see that c2w host file didnot have the caller  C:\Program Files\Windows Identity Foundation\v3.5. 
           I added <add value="WSS_WPG" /> and now it launches
      5.  Now the Dashboard launches and peruser identity works without having kerberos enabled at IIS. I have all the spn and required delegations setup for this url . But i did not configure at the IIS level
    yet.
    It looks like lot of things got messed up and reset. Can we upgrade to windows 2012 r2 with a sharepoint application inplace. what is the recommended approach and Whats happening with Performancepoint dashboards. IS there a known issue with sharepoint 2013
    sp1.
    Raj-Shpt

    Thanks for the above article. Few issues are solved . One of the main issue is with Performancepoint Dashboard.
     I have all the spn and required delegations setup for this url . But i did not configure at
    the IIS level yet. Still per user identity works without having kerberos enabled at IIS.
    Raj-Shpt

  • Perfomance issue with SharePoint List.

    Current System:
    Our application (for submitting and publishing articles) is using WSS 3.0
     to store content and host workflows.
    Article content like PDFs, Images & Videos are stored in a SharePoint document library.
    There is also a list in which we have configured a custom state machine workflow. While creating an list SP item from the UI, instance of the configured workflow instance will be triggered and start monitoring.
    Each article belongs to a Journal.  We have TBs of data stored in content databases. Initially there was only one site collection (“http://<myweb:8080>/ArtcleLibrary”) and entire article data was storing it the same document library.
    Later we decided to split the document library based on journal.  
    To achieve better scalability, we have now changed the application architecture by creating site collection for each journal and keep article content (there are many articles in a journal) in corresponding site collections. We have added more content databases
    and sites collections are equally distributed among these Dbs.
    Now it is like (“http://<myweb:8080>/<journalID>/ ArtcleLibrary”)
    Actual Problem:
    We have achieved scalability in the case of content management by splitting document libraries among different site collections and content databases.
    But still the SP list for managing workflow is in the initial site collection (“http://<myweb>:8080/WorkflowTasks”). This single list contains now 60,000 items (=60,000 workflow instances) even if we deleted completed list items older than 3 months.
    We have performance issues with the current workflow list. It is taking time (avg 20s) to create/read list item from the SP List. Sometimes items are not getting created in the list item.
    From MSDN I came to know than there are recommended count for items in SPList (2000
     or 5000 items).
    What is the best solution to solve the above performance issue with SharePoint list?
    Whether the above mentioned our approach to document library will work for SP list also (means split current SP List and keep in each Journal site collection)?
    Please advise.

    Hi Andrew,
    Thanks for your post.
    I still have some doubts.
    If we go like this, will OWSTIMER be able to handle workflows (custom workflow is attached to SP List) of these many site collections. We have now more than 600 site collections.

  • Windows 8.1 Data reordering issue with Intel Adaptors

    According to Intel, there is a data reordering issue with their adaptors and probably this dumb WIDI software. This is from Intel site. they say some are fixed, "A future Windows 8 fix will address this issue for other Intel wireless adapters." I
    have one Nope, still broke. I get drops all the time. Brand new Toshiba laptop I7 16 gigs of ram and a SSD and a 2 gig Vid card. Would be nice to be able to play games but I get dropped all the time. Now would Microsoft quit hiding
    about this, and fix the darn thing. Also i'm a system admin for 13 years. I have build over 1000 PCs and servers. I know bad software. Please fix this. PLEASE. Its not going to just go away and its not just Toshiba, I have seen other companies with the
    same problem. If there is a Fix PLEASE POST IT. Or even a workaround I have tried everything.
    http://www.intel.com/support/wireless/wlan/sb/CS-034535.htm
     

    Hi,
    Have your first tried the software fix under this link for your network adapter?
    http://www.intel.com/support/wireless/wtech/proset-ws/sb/CS-034041.htm
    Please Note: The third-party product discussed here is manufactured by a company that is independent of Microsoft. We make no warranty, implied or otherwise, regarding this product's performance or reliability.
    Also, you can try to check if there is any driver update under Device manager from manufacture's website.
    Kate Li
    TechNet Community Support
    Yep didn't work. Still get drops all the time, had to run a Cat 5E cable to my laptop from my modem, because I have Atheros Gigabyte Lan adaptor. Works Great. The Wireless still drops all the time. Has Microsoft let out the patch to fix this or is it coming in
    April in the 8.1 patch that's coming. Funny thing is all for Widi, I don't even use widi, I got the software to do that from Samsung works better on my TV. Intel and Microsoft need to get this fixed. because their driving off gamers and that's the
    people that make sure they buy Microsoft so they can play games. With the wireless link dead and a great laptop worthless what's the point. Ive been in IT for 13 years building PCs  and Servers how I knew how to run a 60 FT Cat 5e line thru
    a 2 story house and terminate it. Most people don't. Fix the problem.  

  • Error 10000 Date format issue

    Hi all,
    Has anyone seen the following error please or has a troubleshooting hint: -
    "[NT AUTHORITY\SYSTEM (15/10/2012 18:35:12) - Service request cancelled due to an error.
    Error Code: 10000
    Error Description: Failed to create lease requisition.
    Fault code: soap:Server
    Fault string: Service Form Field: 'WarningDate2' has Date format issue.
    Fault details: REQ_0024Service Form Field: 'WarningDate2' has Date format issue.
    CIAC = 3.01
    Date and Time format on the CCP, CPO, vmware and SQL servers all Italian (dd/mm/yy)
    This only happens when we add a Lease Time on the request.
    Do they all have to be set to the US format for this to work?
    If this is a regional setting thing, do I have to change the format on all of the servers (CIAC components)?
    Cheers
    md

    This test program might help...
    import java.util.*;
    import java.text.*;
    public class ExpandYear
        public static void main(String[] args) throws ParseException
         SimpleDateFormat sdf_2dyear = new SimpleDateFormat("MM/dd/yy");
         SimpleDateFormat sdf_4dyear = new SimpleDateFormat("MM/dd/yyyy");
         String test1 = "3/21/00";
         System.out.println("test1: " + test1 + " to : " +
                      sdf_4dyear.format(sdf_2dyear.parse(test1)));
         String test2 = "4/9/99";
         System.out.println("test2: " + test2 + " to : " +
                      sdf_4dyear.format(sdf_2dyear.parse(test2)));

  • A data-binding issue with a combo box.

    Hi,
    Iu2019m having a data-binding issue with a combo box.  The field it is bound to is an integer.  The valid values in the combo box are 1, 2, and 3.  If I add a record when it is set to 1 or 2, the value gets stored correctly.  If I add a record when it is set to 3, it is stored as 1.  However, I can bring up the record just added on the form, change it to 3, and click u201CUpdateu201D and it is saved correctly as 3.  If I change it so that the valid values are 4, 5, and 6, it saves a 1 regardless of what is selected in the combo box.  It looks like the combo box is correctly bound for updates but not for adds.  The table is a master type UDO.  Any ideas?  Iu2019m somewhat committed to the field being an integer.  I'm using 2007A PL47.
    Thanks,
    Mike
    Edited by: Mike Angelastro on Jul 1, 2009 2:43 PM

    I tried a few things on my own.  The result is that I decided that it was not a good idea to use a combo box bound to an integer (numeric) field.  I donu2019t think the SDK can handle it.  The reason it was an integer field in the first place is that before I changed it to a combo box it was a group of two option buttons.  Option buttons use an integer (numeric) field.  This worked just fine until I added a third option; the SDK didnu2019t handle the third option correctly when adding records.  I thought that using a combo box instead would fix that.  I was wrong; the problem remained.  So I decided to use a character (alphanumeric) field instead.  This works just fine.
    So here is my advice:  Never use option buttons if they need to be bound to the database; a combo box will actually work better when bound to the database.  But use a character (alphanumeric) field.
    Edited by: Mike Angelastro on Jul 5, 2009 9:15 PM

  • Data Pump issue with nls date format

    Hi Friends,
    I have a database with nls date format 'DD/MM/YYYY HH24:MI:SS' from where I wish to take export from. I have a target database with nls date format 'YYYY/MM/DD HH24:MI:SS' . I have a few tables whose create statements have some date fields with DEFAULT '01-Jan-1950' and these CREATE TABLE statements when processed by Data pump is getting failed in my target database. These tables are not getting created due to this error
    Failing sql is:
    CREATE TABLE "MCS_OWNER"."SECTOR_BLOCK_PEAK" ("AIRPORT_DEPART" VARCHAR2(4) NOT NULL ENABLE, "AIRPORT_ARRIVE" VARCHAR2(4) NOT NULL ENABLE, "CARRIER_CODE" VARCHAR2(3) NOT NULL ENABLE, "AC_TYPE_IATA" VARCHAR2(3) NOT NULL ENABLE, "PEAK_START" VARCHAR2(25) NOT NULL ENABLE, "PEAK_END" VARCHAR2(25), "BLOCK_TIME" VARCHAR2(25), "FLIGHT_TIME" VARCHAR2(25), "SEASON" VARC
    ORA-39083: Object type TABLE failed to create with error:
    ORA-01858: a non-numeric character was found where a numeric was expected
    The table create sql which adds a column as ' VALID_FROM DATE DEFAULT '01-jan-1970' ' which I think is the issue. Appreciate if someone can suggest a way to get around with this. I have tried altering the nls of source db to be same as target database. Still the impdp fails.
    Database is 10.2.0.1.0 on Linux X86 64 bit.
    Thanks,
    SSN
    Edited by: SSNair on Oct 27, 2010 8:25 AM

    Appreciate if someone can suggest a way to get around with this.change the DDL that CREATE TABLE to include TO_DATE() function.
    With Oracle characters between single quote marks are STRINGS!
    'This is a string, 2009-12-31, not a date'
    When a DATE datatype is desired, then use TO_DATE() function.

  • SSIS XML task date format issue

    Hi, there;
    I created an SSIS package XML task to import customer XML data.     The LocaleID is set to "New Zealand"
            I have an xml file which has date fields as attribute (dd/MM/yyyy). I created this package and run it in an .NET console program.
        The interesting thing is that: when I run under my own windows account, I can import data into SQL properly (dd/MM/yyyy), but when I run it as scheduled task (under another special windows account) it gives America format (MM/dd/yyyy).
        What I found is that my personal account in AD is set to New Zealand, the special windows account given by the infrastructure engineer
    is set to "default"  which is American user.
        So, my question is that is there any way/something we can set in the package or
     XSD somewhere to tell SSIS what the source date format is rather then controlled by the "AD account"?. The reason is that imagine that
    if I have 2 XML files from different clients, one is New Zealand date format(dd/MM/yyyy), another one is American date format (MM/dd/yyyy), I want same package (NOT same XML task) to import 2 XML files with result in New Zealand format.
       Thank you in advance.
    Cheers
    Robert
    qiuwei

    Hi Robert,
    Based on your description, there are two scenarios:
    You want to format the XML file column date with dd/MM/yyyy or MM/dd/yyyy format to dd/MM/yyyy. In this scenario, we can use Derived Column Transformation to convert the MM/dd/yyyy format to dd/MM/yyyy format for the American XML task, then use the new
    column maps to the corresponding Destination column. The following expression is for your reference:
    LEFT(RIGHT(Column,7),2) + "/" + LEFT(Column,2)+"/"+ RIGHT(Column,4)
    The XML file data already import to SQL table, different country people view the data with different date format. Please note that a datetime column is stored as binary in database, the display format is related to the SSMS server. For more details, please
    see the following KB:
    INF: How to Set the Day/Month/Year Date Format in SQL Server
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Date Format issue in my report.

    Hello Experts-
    I created a report with a date prompt, which we need to enter two dates, start date and end date.
    I followed the steps as they were in this link
    http://obiee101.blogspot.com/2009/03/obiee-between-dates-prompt.html
    I changed the condition in the prompt to Date'1900-1-1' instead of TIMESTAMP'1900-1-1- 00:00:00
    I.e.,
    CASE WHEN 1=0 THEN CALENDAR.D_DATE ELSE Date' 1900-01-01' END
    and
    CASE WHEN 1=0 THEN CALENDAR.D_DATE ELSE Date '2999-12-31' END
    I stored those two dates in two presentation variables start_date, end_date
    In my report, I imposed a filter on my table that, date coulmn in my table is between Date'@(start_date}' and Date'@{end_date}'
    But when I am running the report with entering two dates, I am getting this error:
    *State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 46046] Datetime value 12/1/2010 does not match the specified format. (HY000)*
    I entered 12/01/2010 as start date and 12/02/2010 as end_date
    Can you please guide me in this issue.

    I think your date format is in different format with the date format u stored in presentation variable so better check the date format of the case function u wrote it in you variable that will solve the problem.

Maybe you are looking for

  • Error installing update in Premiere Pro CC 2014.2, error code U44M1I210

    Tried several times to update Premiere Pro CC 2014.2 with the same error code U44M1I210. Tired to contact customer but their site is down.

  • Problem with strings

    how to Store the Contents present in the Outputstream object into String. outputStream ==> String plz suggest some way

  • My 4g touch won't charge 100%

    I have a 4g ipod touch that won't charge 100% even when i leave on the charger for a good little while, I dont wanna leave it on the charger too long cause i'm scared i might fry the battery or something.

  • Serial number for photoshop cs6

    i i got my adobe photoshop cs6 from my school admin,they gave me serial number but i lost now my trial is experied but i signed in to adobe id before to get my product serial number but i dont get any help from my adobe account what should i do?

  • TM doesn't access all of the backups prior to re-install of OS

    1. Various problems led me to get a new hard drive under warranty. 2. Prior to replacing drive, I made sure I had done a recent TM backup onto my external Firewire drive. 3. After reinstalling apps, updating OS, etc, I began to move data from TM to m