Topic
  • 5 replies
  • Latest Post - ‏2014-04-23T22:49:52Z by Lowis
JennyLiu
JennyLiu
14 Posts

Pinned topic How to change the Prompt Date Format

‏2011-06-03T16:35:44Z |
Hi,

We're trying to change the Calendar Date Prompt Format to "mm/dd/yyyy". One of the options from Internet is to change the Locale set on .JS file on the Server but we are not allowed to do this because there are more applications running of the same server and we can not impact any other applications.

There are some options we found, including adding Java Scripts. Howerver, most of the examples are associated on how to set default values to Prompt date and there is no property in genSelectDateHTML to let you set the date format.

Very appreciated for sharing your experience or any idea.

Thanks,

Jenny
Updated on 2013-02-05T03:45:30Z at 2013-02-05T03:45:30Z by SystemAdmin
  • DPotterSQL
    DPotterSQL
    60 Posts

    Re: How to change the Prompt Date Format

    ‏2011-06-08T21:24:43Z  
    JennyLiu,

    Can you please elaborate further?
    If you're saying that you need the date from the Calendar Date Prompt to match a data type that is not a date then you would just have to use the cast/convert function in order to compare. You can also break apart the parts of the date and do your comparison that way.
    If you're just looking to display the prompt date as mm/dd/yyyy, you can set up three prompt text boxes with titles above them and then concatenate them together in the filter and cast/convert if necessary for comparison.
    If you give me a little more information about what you're trying to do I may be able to help further.

    DPotterSQL
  • JennyLiu
    JennyLiu
    14 Posts

    Re: How to change the Prompt Date Format

    ‏2011-06-09T14:20:02Z  
    JennyLiu,

    Can you please elaborate further?
    If you're saying that you need the date from the Calendar Date Prompt to match a data type that is not a date then you would just have to use the cast/convert function in order to compare. You can also break apart the parts of the date and do your comparison that way.
    If you're just looking to display the prompt date as mm/dd/yyyy, you can set up three prompt text boxes with titles above them and then concatenate them together in the filter and cast/convert if necessary for comparison.
    If you give me a little more information about what you're trying to do I may be able to help further.

    DPotterSQL
    Hi DpotterSQL,

    First of all, it is a Calendar Date Prompt. By default, it is displayed as June 8,2011. Now we just want to change its display as 06/08/2011, but still choose the date from a Calendar.

    By using the Java Script we can make it showing as this format with the default value. And then we select the expected Date from the Calendar, and then we are not able to refresh it with the format of mm/dd/yyyy. I think what we're missing here is "what event in Calenda Date Prompt" should be used to refresh the value in the prompt.

    Any idea will be very appreciated

    Thanks,

    Jenny
  • SystemAdmin
    SystemAdmin
    15496 Posts

    Re: How to change the Prompt Date Format

    ‏2013-02-05T03:45:30Z  
    • JennyLiu
    • ‏2011-06-09T14:20:02Z
    Hi DpotterSQL,

    First of all, it is a Calendar Date Prompt. By default, it is displayed as June 8,2011. Now we just want to change its display as 06/08/2011, but still choose the date from a Calendar.

    By using the Java Script we can make it showing as this format with the default value. And then we select the expected Date from the Calendar, and then we are not able to refresh it with the format of mm/dd/yyyy. I think what we're missing here is "what event in Calenda Date Prompt" should be used to refresh the value in the prompt.

    Any idea will be very appreciated

    Thanks,

    Jenny
    Hi All,

    We have same issue in Date Prompt. Default value is displayed as Feb 5, 2013 and expected format is dd/mm/yyyy.

    How to change the Default date prompt value to dd/mm/yyyy @ server.

    Please let me know if any one came across the issue.

    Thanks in advance.

    Regards,
    Srinath
  • Lowis
    Lowis
    5 Posts

    Re: How to change the Prompt Date Format

    ‏2014-04-23T22:49:44Z  

    You should all look a this solution if you want to adjust the date format of athe textbox prompt with calendar

    It work for Cognos 8.3 .... and nearly the same in Cognos 10.2.x

     

    http://cognosibm.blogspot.ca/2009/02/prompt-date-formats.html

     

  • Lowis
    Lowis
    5 Posts

    Re: How to change the Prompt Date Format

    ‏2014-04-23T22:49:52Z  
    Hi All,

    We have same issue in Date Prompt. Default value is displayed as Feb 5, 2013 and expected format is dd/mm/yyyy.

    How to change the Default date prompt value to dd/mm/yyyy @ server.

    Please let me know if any one came across the issue.

    Thanks in advance.

    Regards,
    Srinath

    http://cognosibm.blogspot.ca/2009/02/prompt-date-formats.html