Change "String" into data type "Date"

Hi,
I have created a report containing several date fields for a plan/actual comparison. The connection is built up by using the jdbc connector.
My problem is that the date fields are only displayed as String, but I actually want them to be displayed as Date type.
Here an example:
Right now the date fields are displayed like this "20060411"
but I want them to be displayed like this ("11/04/2006", or similar).
I would appreciate any suggestions to solve this problem!
Cheers
Thomas

Hi Thomas,
Check out the following links :
http://help.sap.com/saphelp_nw04/helpdata/en/55/55a34098022a54e10000000a1550b0/content.htm
http://help.sap.com/download/netweaver/nw04/visualcomposer/VC_60_UserGuide_v1_1.pdf
Re: Custom message in VC
Thanks in advance,
Deep.

Similar Messages

  • Conversion from string "20041023 " to type 'Date' is not valid.

    Hi ,
       I have a table with one of the column(EmpHiredate) datatype is char(10). It has value like "20141023". I need to display this value as date format(dd/mm/yyyy) in report. 
    Following methods i tried in textbox expression but no luck.
    =Format(Fields!EmpHireDate.Value,"dd/MM/yyyy")
    =Cdate(Fields!EmpHireDate.Value)
    Error:
    [rsRuntimeErrorInExpression] The Value expression for the textrun ‘EmpHireDate.Paragraphs[0].TextRuns[0]’ contains an error: Conversion from string "20041023  " to type 'Date' is not valid.
    Is it possible to convert string to date using SSRS textbox expression ? Can anyone help me with the solution.
    Thanks,
    Kittu

    Hi Jmcmullen,
         Found one more issue on the same. I have one value like "00000000" for the column(EmpHiredate)
    , when i use above expression values(ex:"20141023")
    are displaying in dd/MM/yyyy format in report except value like "00000000" and giving following error:
    [rsRuntimeErrorInExpression] The Value expression for the textrun ‘EmpHireDate.Paragraphs[0].TextRuns[0]’ contains an error: Conversion from string "0000/00/00" to type 'Date' is not valid.
    Even i tried to pass its original value("00000000") as below but no luck.
    =IIF(Fields!EmpHireDate.Value = "00000000","00000000",Format(CDATE(MID(Fields!EmpHireDate.Value,1,4) + "/" + MID(Fields!EmpHireDate.Value,5,2) + "/" + MID(Fields!EmpHireDate.Value,7,2)),"dd/MM/yyyy"))
    Also tried this:
    =IIF(Fields!EmpHireDate.Value = "00000000","2000/10/21",Format(CDATE(MID(Fields!EmpHireDate.Value,1,4) + "/" + MID(Fields!EmpHireDate.Value,5,2) + "/" + MID(Fields!EmpHireDate.Value,7,2)),"dd/MM/yyyy"))
    Please Suggest. 
    Thanks ,
    Kittu

  • Characteristic of Data Type = Date follows User Profile Only

    Hi All
    In EHS SVT the characteristic TSCAList_Date [SAP_EHS_1023_053_DATE_LIST] is of Data Type = Date) and follows the date format defined in the User Profile of actual user.
    If a user is using EU profile such as:
    EU date format = 1 DD.MM.YYYY
    EU decimal notation format = 1.234.567,89
    If he enters a date in another format (Such as YYYY-MM-DD - 2010-03-27) than the one defined in the User Profile (DD.MM.YYYY - 27.03.2010); he will get an error message text:  "Value (&) is not numeric"
    Question:
    How he can bypass this error and allow SAP make the conversion to changing the date entered (2010-03-27) to the one used in the User profile (27.03.2010)?
    I will apreciate any Help
    KO

    Hello Ouadria
    very interesting request indeed.
    a.) my understanding of SAP GUI approach is: user has an user id and logon parameter
    b.) by specifing an user profile some "default" set up should be used in further UI interaction in SAP GUI interface (especially date format etc.)
    c.) Therefore it makes "no" sense to use a "different" format in entering a date etc. as specified in the user profile; in addition I believe the "look and feel" of the data (display and no maintain) is once again connected to the user profile, That means if you change the data in user profile the "date" format and "numeric" format should change in UI; this "change" should be active after saving the profile once again (regarding fonts etc. in UI: the change is done "immediate"; user profile changes is done in a further session and I believe the original session is not changed (not sure ..))
    d.) indipendent on  user profile the application makes sure that the data is written into the SAP internal format (date and numeric vlaue) into the tables
    Coming with EH&S 2.7 you can use a new function in class/characteristic maintenance to change (display conversion in different allowed UOM) "UOMs" (etc.) and to get an idea which UOMs are allowed. I believe (not sure) that this new function should be available regarding characteristics of date format too. This function is "hidden" in some sense in the Menue (if I remember correct; i am not using it often).
    May be you could think of a "tricky" way to use the user parametres (by preparing some programming) but I would not investigate the money (and time) but simple change the user profile enter the data and then change back the profile.
    Different "easy" solution would be to use a second user id (one with default format DD.MM.YYYY and second with YYYY-MM-DD)
    May be this helps
    With best regards
    C.B.
    PS: Regarding UOM conversion: take a look here:
    http://help.sap.com/erp2005_ehp_04/helpdata/en/c1/eda0f591ec12408b25e7a1b369ca45/frameset.htm
    And search for topic: "Conversion of Units of Measurement"  which can be found in "Editing Characteristic Values" which is subtopic of: "Value Assignment "
    Edited by: Christoph Bergemann on Nov 19, 2010 10:08 PM
    Edited by: Christoph Bergemann on Nov 19, 2010 10:11 PM

  • Handle null value in char infoobject -data type DATE(ora-01722 invalid num)

    Hi,
    We have a DSO with a info object in the Data fields. The char info object has the data type DATE and most often it has the null value. but some times  it has data in it.
    When ever we were trying to run a report on the DSO it throws a error  as  ORA- 01722 INVALID NUMBER.
    we tried editing PSA data and placing 00000000 for null values - and had a message  invalid date.
    suggestions pls
    Regards.

    Hello,
    Please check the note given below
    https://service.sap.com/sap/support/notes/1327167.
    If null value is the problem,  change the query setting for not to show the null values. Just add a filter in ZDAT to exclude "NULL"
    Thanks
    Nidhi

  • Issue with Data type 'Date' in Hyperion Planning V11.1.2.2

    Hi,
    I have created members with data type date. However when I save the date, it either disappears or comes up with a random date? Has any one come across this kind of problem before?
    If so can you share the fix.
    Thanks in advance for your help.
    Cheers,
    XXX

    Hi
    This problem is linked to you not having a consistent setting for your date input type.
    So, go to application administration and set the date format to MM/DD/YYYY in application settings and display options, under current application defaults. Then after you have done this as a user go to User Preferences and display options and on the date format select the same. Or remove the Automatically detect.
    I have seen this behaviour if you have Automatically Detect on the user preferences
    Thanks
    Anthony

  • Convert string into java.sql.Date

    Hi,
    I want to convert a date in string form into java.sql.Date to persist into the database column with Date as its datatype in Oracle. I'm trying as follows:
    import java.sql.Date;
    import java.text.ParseException;
    import java.text.SimpleDateFormat;
    public class DateTest
    public static void main(String[] args)
    String strDate = "2002-07-16 14:45:01";
         System.out.println("strDate = "+strDate);
    Date aDate = null;
    try
    if(strDate != null && !strDate.trim().equals(""))
         SimpleDateFormat aSDF = new SimpleDateFormat();
         aSDF.applyPattern("yyyy-MM-dd hh:mm:ss");
         java.util.Date utilDate = aSDF.parse(strDate);
    System.out.println("utildate = "+utilDate);
         aDate = new Date(utilDate.getTime());
         aDate.setTime(utilDate.getTime());      
         System.out.println("aDate = "+aDate);
    catch (ParseException e)
    System.out.println("Unable to parse the date - "+strDate);
    catch (Exception ex)
    ex.printStackTrace();
    System.out.println("Caught Exception :"+ex.getMessage());
    It gives the output as :
    strDate = 2002-07-16 14:45:01
    utildate = Tue Jul 16 14:45:01 IST 2002
    aDate = 2002-07-16
    If I put this value into the database table, I can see only the date. Time part is missing. Is this the problem with java.sql.Date or Oracle datatype Date? Please help me asap.
    Thanks in advance.
    Regards,
    Rajapriya.R.

    If I put this value into the database table, I can
    see only the date. Time part is missing. Is this the
    problem with java.sql.Date or Oracle datatype Date?This is not a problem, this is the defined behaviour of the Date type. RTFAPI and have a look at Timestamp, while you're at it.

  • How to convert server specific date string into client specific date object

    Hi developers,
    I have a very complex issue to convert the server date string format "EEE MMM dd HH:mm:ss z yyyy" into java.util.Date object and find the difference of the client machine date to represent the elapsed time
    The problem is the server time zone and client time zone are not unique and when I try to covert the server date which is in string format to date format using SimpleDateFormat class , I got the server time as 3:30 hours appended to it. The server time zone is in IST and Client time zone format is GMT+5:30 , the appended time of 3:30 hours created the confusion in calculating the elapsed time between the server started time and client requested time
    I went through all the sites but none of them were useful
    If any help to solve the above issue is appriciated
    please send the response with the same subject line
    Advance Thanks

    Why don't you just subtract from the server time the 3:30 hours (consult api of java.util.date) before comparing with the client date? Hard to see where's the problem...

  • Change what data type data socket requests from OPC server

    I suspect this is a foregone conclusion, however just in case; is there a way to make Datasocket request items from an OPC server in a different data type than variant?
    I have a server that scales integers (native data type) and offers tham as floating point values, however to get those nice floats the client must request the data in the right type. If the client asks for a variant the server will return the integer value (e.g. 2 instead of 2,36...).
    I have not checked whether this is a server behaviour as it must be (according to OPC specs) or if it's just a choice by the vendor (Automated Solutions), but still it may become an obstacle.
    Has anyone implemented OPC Client functionality without using Datasocket (and server for that matter)? Any software componants you can recommend?
    MTO

    Hi Mats
    I once found vi's (..\vi.lib\Platform\dataskt.llb) with different read- and write-types. In fact they are all wrapping up the read- & write-variant functions.
    I use them to communicate with Siemens OPC-Scout and it works. They make life a little easier .
    Hope this helps.
    Thomas
    Using LV8.0
    Don't be afraid to rate a good answer...

  • How to convert strings into character type?

    I have created a function module which will display the attributes of the fields of the structure/table by using "DESCRIBE FIELD" command. The problem is that it supports only character-type data objects and the program goes into dump
    if the structure contain any string type.

    Please have a look at class CL_ABAP_DATADESCR. Using this instances of this class should provide all information needed...
    Reward points, if reply is applicable

  • Idoc message type which contains all  data types & date format

    Hello experts,
    I have Two questions :
    1.Need Idoc message type which has all sap data types (24 types).
    2. I am getting output date in  31-05-1999, whereas am expecting 5/31/1999.
        is there anything to be done at system level, since same Func Mod gives expected output in 4.7 verions, whereas in ecc 6.0 version it doesnt.
    Thnx in advance

    Hi Taj,
      The date format usually depends upon the user settings in SAP. for this check your user settings... Go to menubar - > System - > user profile -> own data ->defaults tab -> change the date format in which you want.
    Or else.......
    There is a conversion exit to change the date in the format you wish to get.... use the Function Module  FORMAT_DATE_4_OUTPUT and give the date  and the format in which you want to print as input parameters.
    Hope this helps.
    Regards,
    Ravikiran.

  • Change strings of (strict type def) refnum

    mitulatbati wrote in http://forums.ni.com/ni/board/message?board.id=170&thread.id=233257&view=by_date_ascending&page=5:
    Hi,
    I have made a strict type def, which is a text ring. I open the VI reference -> get Panel property node -> Controls[] -> Index first element (there is only one, the ring) -> change Strings and values, and then close reference.
    If I call this subvi from a VI, which includes this strict type ring, it will be only updated, when I restart the VI. And not in runtime. I don´t get any error, everything looks fine, but the strings and values are not updated :-(
    Is there a way not to restart the VI, but to modify the ring programatically?
    regards
    MB
    Message Edited by shb on 07-29-2008 11:52 AM

    Hello mitulatbati,
    I do something similar with a Combo Box. The reference to each box is stored in an unitinialised shift register of a VI. When I want to change the selectable text, I do it in a for loop for every stored control.
    A VI doeing this for Rings is attached (LV8.2.1).
    Greetings,
    shb
    Attachments:
    Demo - Update Ring synchron.vi ‏21 KB
    Update Ring synchron1.vi ‏14 KB

  • Change string into Date?

    Hi guys
    I am writing a voice web application. My problem is when i speak the date it gets inserted into the textbox as a number e.g. 01012005 however when i pass this to my jsp then i get an error cause this not a valid date format.
    Can you help me change the number into a date e.g. insert / to split the day month and year up? so i can insert it into my database.
    Thanks

    You could use java.text.SimpleDateFormat to convert Strings to Date and back.
            SimpleDateFormat sdf = new SimpleDateFormat("ddMMyyyy");
            Date d = sdf.parse("01012005");ram.

  • String into java.sql.Date

    Can anyone tell me how to convert a String (yyyy-mm-dd) into a java.sql.Date format? Also I need to test to see if the Date of birth (entered in the format above) is >= 18.
    Can I do this in an SQL query?
    Thanks
    Marika Ludmann

    Can anyone tell me how to convert a String
    (yyyy-mm-dd) into a java.sql.Date format? Also I need
    to test to see if the Date of birth (entered in the
    format above) is >= 18.
    Can I do this in an SQL query?
    Thanks
    Marika LudmannTry this:
       String dateStr = "2003-04-29";
       SimpleDateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
       Date result = formater.parse(dateStr);Don't forget to add the
    import java.text.SimpleDateFormat;

  • HTMLDB search on columns defined as data type date

    I have a HTMLDB applications that has a date column in the report. When I search and enter a date, no rows are returned. How do I enter the date in search text so that rows are returned?

    Hi Suresh:
    This is what I would do.
    Here is the demo...Hope this will help.
    BHAVESH@oracle10> create table suresh(created_date date, attribute1 varchar2(20));
    Table created.
    BHAVESH@oracle10> desc suresh
    Name Null? Type
    CREATED_DATE DATE
    ATTRIBUTE1 VARCHAR2(20)
    BHAVESH@oracle10> insert into suresh values (sysdate,to_char(sysdate,'yyyy/mm/dd hh:mm:SS'));
    1 row created.
    BHAVESH@oracle10> insert into suresh values (null,to_char(sysdate,'yyyy/mm/dd hh:mm:SS'));
    1 row created.
    BHAVESH@oracle10> select * from suresh;
    CREATED_DATE ATTRIBUTE1
    01/01/2009 11:24:08 AM 2009/01/01 11:01:08
    2009/01/01 11:01:28
    BHAVESH@oracle10> -- please notice my nls_date_format is mm/dd/yyyy hh:mi:ss AM
    BHAVESH@oracle10> -- which can be changed to anything...use alter session or on windows..using registry..or on server
    BHAVESH@oracle10> -- ....using nls_date_format init parameter.
    BHAVESH@oracle10> alter session set nls_date_format = 'DD-MM-YYYY';
    Session altered.
    BHAVESH@oracle10> select * from suresh;
    CREATED_DA ATTRIBUTE1
    01-01-2009 2009/01/01 11:01:08
    2009/01/01 11:01:28
    BHAVESH@oracle10> -- however, this may not work for you.
    BHAVESH@oracle10> -- so, you can convert the date in the format you want
    BHAVESH@oracle10> select to_char(created_date,'DD-MM-YYYY') as converted_date, ATTRIBUTE1 from suresh;
    CONVERTED_ ATTRIBUTE1
    01-01-2009 2009/01/01 11:01:08
    2009/01/01 11:01:28
    BHAVESH@oracle10> -- now use the decode function
    BHAVESH@oracle10> ed
    Wrote file afiedt.buf
    1* select s.*, to_char(decode(created_date,null,to_date(ATTRIBUTE1,'yyyy/mm/dd hh:mi:ss')),'dd-mm-yyyy') as new_date from suresh s
    BHAVESH@oracle10> /
    CREATED_DA ATTRIBUTE1 NEW_DATE
    01-01-2009 2009/01/01 11:01:08
    2009/01/01 11:01:28 01-01-2009
    If your date format is different under the attribute1 column, then you have to write a PL/SQL function to handle different date formats under the same column of different column!
    THanks
    - Bhavesh

  • User-Defined Data Type (Data Transfer Objects) is null

    hi
    i try to access a nested complex datatype over blazeds. i always see that the second level of the  complex datatye is NULL but the other data's like String are ok.
    here an example:
    as you can see TT1 has a member TT2, and a String
    TT2 has a member TT3 and a string
    and TT3 has just a string.
    in the ActionScript the TT2 referenz in TT1 is always NULL.
    Java Code
    Java code:
    package clientreportingserver;
    public class TT1 {
        public String getT1s() {
            return t1s;
        public void setT1s(String t1s) {
            this.t1s = t1s;
        String t1s;
        public TT2 getTt2() {
             return tt2;
        public void setTt2(TT2 tt2) {
             this.tt2 = tt2;
        TT2 tt2;
    =================================================
    package clientreportingserver;
    public class TT2 {
        public String getT2s() {
            return t2s;
        public void setT2s(String t2s) {
            this.t2s = t2s;
        String t2s;
        public TT3 getTt3() {
             return tt3;
        public void setTt3(TT3 tt3) {
             this.tt3 = tt3;
        TT3 tt3;
    =================================================
    package clientreportingserver;
    public class TT3 {
         public String getT3s() {
            return t3s;
        public void setT3s(String t3s) {
            this.t3s = t3s;
        String  t3s;
    ActionScript DataType
    package clientreporting.model
    import mx.collections.ArrayCollection;
    [RemoteClass(alias="clientreportingserver.TT1")]
    [Bindable]
    public class TT1
        public var t1s:String;
        public var t2:TT2
    ====================================================================
    package clientreporting.model
    import mx.collections.ArrayCollection;
    [RemoteClass(alias="clientreportingserver.TT2")]
    [Bindable]
    public class TT2
        public var t2s:String;
        public var t2:TT3
    ===================================================================
    package clientreporting.model
    import mx.collections.ArrayCollection;
    [RemoteClass(alias="clientreportingapi.TT3")]
    [Bindable]
    public class TT3
        public var t3s:String;
    here the output from blazeds. for me it looks perfect, all data are transmitted
    BlazeDs output
    [BlazeDS]Deserializing AMF/HTTP request
    Version: 3
      (Message #0 targetURI=null, responseURI=/5)
        (Array #0)
          [0] = (Typed Object #0 'flex.messaging.messages.RemotingMessage')
            source = null
            operation = "getTT"
            destination = "exposedServiceWrapper"
            clientId = "E57066B1-170E-503A-D4EC-004166E95FC3"
            body = (Array #1)
            timeToLive = 0
            headers = (Object #2)
              DSEndpoint = "channel-amf"
              DSId = "E570490A-C218-4A29-4229-8CD6F29222FC"
            timestamp = 0
            messageId = "5FDB47AD-9066-DD95-4CD4-0CE0D3F6C337"
    [BlazeDS]Adapter 'java-object' called 'null.getTT(java.util.Arrays$ArrayList (Collection size:0)
    [BlazeDS]Result: 'clientreportingserver.TT1
      t1s = TT 1 String
      tt2 = clientreportingserver.TT2
        t2s = TT 2 String
        tt3 = clientreportingserver.TT3
          t3s = TT 3 String
    [BlazeDS]Serializing AMF/HTTP response
    Version: 3
      (Message #0 targetURI=/5/onResult, responseURI=)
        (Externalizable Object #0 'DSK')
          (Typed Object #1 'clientreportingserver.TT1')
            t1s = "TT 1 String"
            tt2 = (Typed Object #2 'clientreportingserver.TT2')
              t2s = "TT 2 String"
              tt3 = (Typed Object #3 'clientreportingserver.TT3')
                t3s = "TT 3 String"
    1.262936445958E12
    (Byte Array #4, Length 16)
    (Byte Array #5, Length 16)
    (Byte Array #6, Length 16)
    the last Alert (accessing t2) got always a null pointer, the fist Alert works fine and print out the string i expected to see
    call in ActionScript
        public function loadTT():void {
           _policyService.getTT(loadTTHandle);
        private function loadTTHandle(content:TT1):void {
           Alert.show("" + content.t1s);
           Alert.show("" + content.t2.t2s);
    is it possible to access a nested complex type? i only could find simple examples.
    thanks for your help joe

    I found the problem
    in the flashlog.txt i found :ReferenceError: Error #1056: Cannot create property AFoo on [...]
    this let me to this blog http://blog.comtaste.com/java/  ==>
    Automating  ActionScript 3 classes generation from Java Beans in a LiveCycle Data Services context
    it was a naming problem.

Maybe you are looking for

  • Getting to next JSP from Servlet

    I am getting a 404 when I try to redirect from my servlet to an error page. The code that I am testing is.... catch (SQLException es) LOG.error("Unexpected error in Login.createUser.Error message = " + es); session.setAttribute(Constants.MESSAGE, es.

  • Nilvaiu.dll pas trouvé avec LabVIEW 821...

    nilvaiu.dll pas trouvé avec LabVIEW 821... Impossible de reprendre un vi créé avec LabVIEW 820 : pb au niveau de l'assistant DAQ. Merci d'avance. T.

  • Internet Sharing w/o wireless

    There's a preponderance of info out there on setting up Internet sharing which involves wireless. I'm looking to setup internet sharing on my MacPro (has 2 ethernet ports) wired/directly connected (read: crossover cable connection) to a WinXP box. I

  • Want a code to check & install JRE automaticallly without user intervention

    hi I am trying to run an applet on a machine that is not having JRE on it. want a code that will check for such condition and install JRE automatically. If JRE is already present then it should check for required version and enable it also. please he

  • Create a notification order from IW22 versus IW28

    When I create a notification order from a notification from IW28, I click the "Create Order" button and it takes me into IW34 where I can enter the Order Type. When I go into the notification(IW22) from IW28 and click create order from IW22, the popu