End of year as default value in date item [SOLVED]

Hi
I'd like the last day of the current year (i.e. 31.12.2008) to be the default value of an item (in Forms 6i) (Format dd.mm.rrrr).
The default value in the database is
TO_DATE('31.12.'||TO_CHAR(sysdate,'yyyy')) and there it works fine.
In Forms I have a WHEN-CREATE-RECORD Trigger with:
my_item := TO_DATE('31.12.'||TO_CHAR(sysdate,'yyyy'));
(generated from Designer)
However, whatwever I write there I always get some "crap" in the form, most of the time 20.12.0031.
I can see that it has something to do with the language settings, but don't know where to make some changes.
Can anybody help my on this, I am aware, trivial matter.
Thanks
Karine
Message was edited by:
kpa

Try this:
my_item := TO_DATE('31.12.'||TO_CHAR(sysdate,'yyyy'), 'dd.mm.yyyy');

Similar Messages

  • Default value for date

    Hi experts,
    I want to set default value for dates..
    My screen has : date_from & date_to.
    date_to : will be current date(today's date) if Eg: 27.08.2007 (here i used NOW())
    then date_from must be 01.06.2007 (3 months logic)
    similarly : if date_to is 01.01.2007
    then date_from must be 01.11.2006
    kindly help...
    Thanks a lot!!!
    Regards,
    Bijal

    Hi Bijal
    (DGET(NOW(),'D'))-1) returns number which is 0 incase of 01.08.2007, so DADD(NOW(),-0,'D') is again ideally same day 01.08.2007 .
    So, DADD(DADD(NOW(),-0,'D'),-2,'M') should give you 01.06.2007.
    <b> IT WORKS!!! -
    I have tested it now.</b>
    Please check and revert.
    The IF formula which sent actually returns String, so use DVAL(IF(DGET(NOW(),'D')!=1,DADD(DADD(NOW(),-((DGET(NOW(),'D'))-1),'D'),-2,'M'),DADD(NOW(),-2,'M')))
    Message was edited by:
            Navneet Giria

  • How to set the default value of an item type DATE PICKER to the day of yest

    Hi
    How to set the default value of an item type DATE PICKER to the day of yesterday ?
    Thank you very much !
    Christian.

    Hi Christian,
    Have a look at this thread Re: Default the Date Picker to Today
    It covers this issue in detail.
    Regards
    Paul

  • Default value of date as first day of month

    Ho can I make my default value of date parameter as first day of month? {$SYSDATE()$} gives only current date and we can make it like {$SYSDATE()-7$} if we want to minus 7 days but how can we set the default value to first day of month?

    I got the answer...It is {$FIRST_DAY_OF_MONTH()$} instead of {$SYSDATE()$}

  • How to set default value to date type attribute.

    Hi,
    How to set default value to date type attribute.
    E.g I want to set u201C01/01/1999u201D to date attributes.
    First i want to set value and then i want to fetch the same & want to check equals.
    please suggest solution.
    Regards,
    Smita

    Hi,
    In wdinit() method u can set the date
    DateFormat df = new SimpleDateFormat("MM/dd/yyyy");
    Date today = Calendar.getInstance().getTime();
    String reportDate = df.format(today);
    wdContext.currentContextElement().setFromDate(reportDate);
    Another way you have set the this formate like that
    1. Create a Simple type under "Dictionaries->SimpleType" called DateFormat
    2. Select the type as "date"
    3. Go to the "Representation" tab and set the format as "dd/MM/yyyy" (or whatever u want, but month should be MM)
    4.Bind the context attribute to the type created now.
    Hope this helps u.
    Best Regards
    Vijay K

  • Cannot set the default value of an item in the detailed table

    Hi,
    I have Master-Detail group, both are Table formats.
    I need to set the default value of an item in the details row to the value of an item in the selected row in the Master table.
    I tried Default Display Value=#{row.MasterItem}, but it seems it is trying to access current details row instead of the Master.
    I tried #{bindings.MasterGroupColumnName.inputValue}, but it does not work.
    Any ideas
    Thanks in advance
    Mohamed

    I think I now what I'm doing differently, I had the "New Rows" JHS property of the detailed table group "empty" instead of the default "2" value.
    It seems that "Default Display Value" expression works only for the new records specified in the "New Rows" property. But when I try to "Add" new record using the "Add Row" button, the new record inserted does not have the default values generated, only has values populated for the items of the FK (in the view link) but not the ones set through the property.
    I guess in a nutshell, how I can get the details item to behave like the FK columns?
    Thanks much
    Mohamed

  • Set default values in date prompt

    Hello,
    I have tried everything I can find in the forum to resolve a very daunting task. Thanks in advance for all your help.
    We have Crystal Server 2008 with Tomcat and IIS.
    I have several reports that use start date and end date  as parameters. When the user launches the report date prompt dialog box appears where you user can input the values. Typically (75% ) the user is always looking for yesterday's data however at times he/she would want to pick different date range to review the results. The requirement is to set the default values in the dialogbox to be currentdate-1. Any help is greatly appreciated.
    Paul.

    What we do for all of our reports is have the date parameters be text fields that allow something like PD for prior day, PM for prior month, CM for current month, YTD for year to date, etc.  We then have crystal functions (and database functions; one for start dates and one for end dates) that translates the characters to real dates.  If the text entered does not match one of the "mnemonics", it is assumed to be a date, and it is treated as such.  This allows using the same report for scheduled daily, weekly, monthly, quarterly, etc. and ad-hoc runs without any other special coding.  In your case, you'd set the default parameter values to PD.
    Our mnemonics are of the form [PY]{P|C}{D|W|M|Q|Y}[DOW][{+|-}n], where [PY] is optional to specify a prior year date (for comparison reports), P=Prior, C=Current, D=Day, W=Week, M=Month, Q-Quarter, Y=Year, [DOW] is optional, and used with [PY] to specify that you are looking for the same day of week in the prior year (if CD=8/24/09, PYCDDOW=8/25/08), and the +n or -n allows you to add or subtract days/weeks/months/quarters/years (depending on the interval used) to the date.
    HTH,
    Carl

  • Default value for date parameters

    Hi,
    There are several reports that have from_date/to_date parameters where the default value is, e.g. 01/01/2012 and 31/12/2012.
    Every year, after the previous year is closed, I go through the process of having to change the default values to the new year in all the reports. I have checked but not found an option of using a formula for a default value in a parameter. Could there have been something new recently that I missed?
    Or does anyone have a suggestion of a way to get around it? I have tried in the past trying to extract the year from sysdate, but have not succeeded in getting a formula that the Discoverer accepts in the default value.
    Thanks.
    Leah

    Thanks for the information. I doubt that my boss would go for it but I will speak to him when I am at work next week. We have some old reports which have a default value of null and that would most probably be confusing for many of the users. Is there a way to have the default the end of the year also?
    Once again, thank you.
    Leah

  • Set default value for date/time to previous month

    Hi All
    I have two date/time parameters in my report and I want to set the default value for both the parameters
    For start date parameter I want the first date of previous month and for end date parameter I want the last date of previous month.
    Can someone please point me to the right direction
    Thanks
    Rone

    Hi Rone,
    These links can be helpful for you:
    http://www.bidn.com/blogs/hardikabhavsar/bidn-blog/1639/default-date-parameters-in-ssrs
    http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/584a98ae-bb75-4740-9198-e6be3c1aec12/
    Regards,
    Manoj
    *Happy to help
    http://experiencingmsbi.blogspot.com/

  • Can you set a default value using Data Mover Scripts?

    Hi,
    We're going through a upgrade of PS Fin 8.9 -> 9.1. We've found some existing tables with new columns that are marked as NOT NULL so we're having trouble migrating the data using DMS.
    Is there a way to Export the data from 8.9 and when importing into 9.1, set a default value for the new column using DMS?
    A specific example would be the PS_SOURCE_TBL where EXCHANGE_RATE_OPTN is new and NOT NULL.
    Thanks for any assistance.

    What you could do is first rename the record to be imported
    IMPORT SOURCE_TBL AS PS_SOURCE_TBL_ORG;
    Then write a insert/select script from PS_SOURCE_TBL_ORG to PS_SOURCE_TBL defaulting column EXCHANGE_RATE_OPTN
    Insert into PS_SOURCE_TBL (COLUMN,COLUMN,COLUMN,COLUMN, EXCHANGE_RATE_OPTN)
    select PS_SOURCE_TBL_ORG (COLUMN,COLUMN,COLUMN,COLUMN, 'defaultvalue');
    And then drop table PS_SOURCE_TBL_ORG to clean up your database.

  • Default values for data types

    what are default values for all the data types that exist  in abap
    Title was edited by:
            Alvaro Tejada Galindo

    Hi
    For CHAR data type default is SPACE
    for INTEGER,PACK and FLOAT types it is ZERO '0'
    for NUMERIC also so many Zeros
    for Time(TIMS) it is 6 zeros and Date(DATS) it is 8 zeros
    Regards
    Anji
    Message was edited by:
            Anji Reddy Vangala

  • How to make default values for date range?

    Dear Colleagues,
    My customer is asking for a default value for a date range prompt.
    The FromDate should contain the 1st of current month, the ToDate should contain current date.
    Does anyone have any idea how I can meet this demand?
    Regards Silje

    Hi Federico,
    Thank you for the answer, we are back to the challenge after summer vacations!
    I have created a variable in the universe: SELECT current date  as TODAY FROM SYSIBM.SYSDUMMY1. I Called it TODAY.
    Then I created a prompt in the query based on Date. In Prompt Properties I tagged for "Set Default Values" and I typed in TODAY.
    When I try to run the query I get the error message:  The date for the query filter based on 'Date' is invalid (WIS10704).
    What is wrong? What do I have to do differently?
    My goal is to have a default for Date that gives me today..
    Regards Silje

  • What is the default value whe data type is numaric

    dear
    can you tell me the defult value of the coloum when we set it to numaric
    i want to pull the data from the table using blank or default valu in that colum
    i had done the following qry
    SELECT T2.[U_NoofSpl] FROM [dbo].[@MINSPL]  T0 INNER JOIN  [dbo].[@SPLPLAN]  T1 ON T0.Code=T1.U_BasCode INNER JOIN  [dbo].[@SPLPANRF]  T2 ON T1.Code = T2.Code
    WHERE T0.[U_ItemCode]='CON00001' AND
    T2.[U_QtyTo]='' *
    here i want to set the valu like = 0 or ''
    thanks in advance

    Hi Kishor,
    Try This....
    SELECT T2.[U_NoofSpl] FROM [dbo].[@MINSPL]  T0 INNER JOIN  [dbo].[@SPLPLAN]  T1 ON T0.Code=T1.U_BasCode INNER JOIN  [dbo].[@SPLPANRF]  T2 ON T1.Code = T2.Code
    WHERE T0.[U_ItemCode]='CON00001' AND
    T2.[U_QtyTo]=0
    or
    SELECT T2.[U_NoofSpl] FROM [dbo].[@MINSPL]  T0 INNER JOIN  [dbo].[@SPLPLAN]  T1 ON T0.Code=T1.U_BasCode INNER JOIN  [dbo].[@SPLPANRF]  T2 ON T1.Code = T2.Code
    WHERE T0.[U_ItemCode]='CON00001' AND
    T2.[U_QtyTo]=Null
    Thanks
    Shafi
    Edited by: shafi_sunshine on Aug 23, 2011 1:44 PM

  • Vendor Line Item Display-Default value for customer items

    Is it possible in selection screen of transaction FBL1N (Vendor line item display) the default value of field "customer items" to be checked?
    Thanks in advance.

    hi Tsiami
    it's not possible. if u want check customer line items go throw this TC:FBL5N
    plz assign points
    regards
    sivareddy.

  • Set default value for listbox items - Acrobat Javascript

    Hello,
    I am trying to set the default value for a listbox where multiple items are selected.
    If a single item is selected then this.getField("zzz").defaultValue = x; works fine, but you cannot use defaultValue for multiple indicies. The manual mentions the user or export events but I cannot see how that would work.
    Any help will be appreciated.
    Andrew

    I hope somebody can provide help with this as I'm having a similar problem.
    http://www.directorygump.com

Maybe you are looking for

  • N79- can't send messages

    My N79 no longer sends the text messages I write... I was in Kenya for 4 weeks, it worked fine there both with my regular sim card and a Kenyan one. When I got to the airport in Istanbul I could no longer send messages. I tried again in Munich and th

  • Opening Unsigned VIs from version 5.1

    I am evaluating the new LavVIEW 7.0 Express. I am getting an error message 34 unsigned VI when trying to open VIs created in LabView 5.1. I am just getting back into LabVIEW development and considering an upgrade to 7.0. Thanks

  • Display msg when Schedule line is changed

    Hi Experts, I have a requirement that when Schedule line qty is made zero then an error msg should be displayed. Msg should be displayed as soon as qty is made 0 and enter is pressed and at the time of saving it. I have tried to code in User exit fie

  • WA 9.3.1, centralized the value position in bar chart?

    In Web Analysis 9.3.1, I have one bar chart, when I select show value, the figures (amount or percentage) will be displayed in the all the bars,. However, I notice the position of the values are at the top of the bar. I am not able to find the option

  • User ftpuser has no access authorization for computer(FTP_CONNECT)

    Hi Gurus i am getting error like this  "User ftpuser has no access authorization for computer" when i am trying to ftp_connect.i did use before this 'HTTP_SCRAMBLE' but still not getting output .i searched SDN its says answred but no solution.can any