Formatting Date and Time in Smartforms.

Hello,
I'm a newbie and I'm working with smartforms.
My requirement is to get the following format of date and time in a text within a template.
'MMM DD HH:MM'
Like : Jan 01 12:45
I have tried SAPScript Commands like 'SET DATE MASK' but that doesn't appear to work.
Do I have to use a Function Module?
Please help out. A sample code will be appreciated!
Regards & Thanks,
Arun G Nair

Hi,
please see this code
DATA: V_DATE1 TYPE STRING
SELECT SINGLE LTX FROM T247
   INTO MONTH_NAME
   WHERE SPRAS = SY-LANGU
   AND MNR = SY-DATUM+4(2).
CONCATENATE MONTH_NAME  SY-DATUM+6(2)  DATE1(4)
    INTO V_DATE1 SEPARATED BY SPACE.

Similar Messages

  • Convert XML string into an abap format date and time

    Hi,
    Does anyone know of a method or a function module in ABAP which converts XML string into an abap format date and time.
    Here is a part of the xml that I want to convert.
    <ns2:EventDateTime>2009-07-02T10:13:45+10:00</ns2:EventDateTime>
    <ns2:EventMessageTransmissionDateTime>2009-07-02T10:13:45.987+10:00</ns2:EventMessageTransmissionDateTime>
    Currently EventDateTime and EventMessageTransmissionDateTime are type XSDDATETIME_Z and these are converted to proper dates and times. We will be changing these fields to a STRING instead of XSDDATETIME_Z. The reason for this is to make the field more versatile. The customer would be receiving dates with Zulu (2009-09-23T12:00:00Z), with offsets (2009-09-23T12:00:00+10:00/-10:00) and just local timestamp (2009-09-23T12:00:00). With this, we need to make the date fields as string
    to be able to accept the various date formats (esp. the local timestamp).
    I am looking for a standard function module or method that will convert the xml string to a proper date and time abap format.
    Would appreciate anyone's help!
    Thanks.
    Edited by: eunice ocson on Jul 13, 2009 1:49 AM
    Edited by: eunice ocson on Jul 13, 2009 1:50 AM
    Edited by: eunice ocson on Jul 13, 2009 1:51 AM
    Edited by: eunice ocson on Jul 13, 2009 1:51 AM

    Hi Eunice
    Use the FM 'SMUM_XML_PARSE'
    for more info
    [Convert XML string to ABAP|XML String to ABAP or GUI]
    hope it helps you.
    Thanks!!

  • How do i format date and time in SSRS 2008

    Okay, so i am working with SSRS 2008. I am formatting the date and time. Right now the current out put is 1/13/2014 8:02:11 AM. I want the output to
    be 1/13/14 8:02 AM. What is the expression for this? 
    Thanks in advance

    There are 2 functions that can be used, Format and FormatDateTime.
    http://www.jackdonnell.com/?p=122
    "You will find a fortune, though it will not be the one you seek." -
    Blind Seer, O Brother Where Art Thou
    Please Mark posts as answers or helpful so that others may find the fortune they seek.

  • Ack file date and time format is same as in source xml format

    Hi...All,
    1) my scenario is file-rfc-file using BPM,
    we are getting file in xml format from source along with timestamp and this data will be going to R/3 and the acknowledgement (success or failure) file will be sending back to source system.
    in this sceneario we have to fulfill in the follwing client requirement
    File1.<same File1 date and time>.XML
    Is it possible to make it as the following? if it is possible
    could u please let me know how to fulfill the follwing requirement.
    ACK File1.<same File1 date and time>.XML
    Where <same File1 date and time> format = u2018YYYYMMDDhhmmssu2019 .
    2) Is the XML file name visible in the SAP-XI monitoring screen and will it help to trace the messages?
    thanks in advance,
    Pasi.

    Hi,
    I didnot under stand your first question coulf you be more specfic.
    2. Ans : In general , we will follow the below steps
    --First we we check for the file is picked or no, if not see the Sender side CC parameters like mode and path details
    --If file was picked then we need to check whether we are using the File content conversion parameters or not if yes we need to check the FCC parameters ,
    Goto RWB-Channelmonitoring by the following link
    http://host:port/mdt/channelmonitorservlet
    select the sender side CC name and check for errors
    If no errors in above, goto SXMB_MONI for Integration Engine xml processing , check for successful or error occured black or red color
    --if success in SXMB_MONI then we need to check in RWB as above channel monitor now select the receiver side CC
    If no errors then check for output file is placed intarget or not
    Please reward points if it helps
    Thanks
    Vikranth

  • Menu bar date and time format in Lion

    Is there a way to change the formatting of the date and time shown in the menu bar in Lion? I've been googling for a while, but can't find a solution. At the moment the time has a very unusual format of <hh:mm.ss>. Note the '.' before seconds. What I want to achieve is to change that dot to a colon as it normally is (and was in Leopard and earlier, don't know about Snow Leopard), ie. <hh:mm:ss>. I've checked the date and time formats in system settings several times, but those have no effect on the menu bar. When I set the clock to display an analogue icon and click on it, the date and time in the popup menu are shown correctly using the full format.

    johankytt wrote:
    Well ofcourse I am. And no, I am not using a third party utility. This functionality has been available in OSX for ages.
    I never noticed that option! 
    It works ok for me (with a colon, not a dot).  
    Is it possible you have a dead pixel where the top dot of the colon should be?

  • Aperture was not able to adjust the date and time of the master file "2008-06-22 at 14-41-14.jpg" because it has a format that does not permit date modification.

    I can't seem to find a way to update the date/time of a master file. There is a format issue but I can't seem to figure out how to correct it.
    Aperture was not able to adjust the date and time of the master file “2008-06-22 at 14-41-14.jpg” because it has a format that does not permit date modification.

    Can you post an ipconfig /all from the server and the DC?
    Robert Pearman SBS MVP
    itauthority.co.uk |
    Title(Required)
    Facebook |
    Twitter |
    Linked in |
    Google+

  • I need to get the Current System Date and time in the format

    I need to get the Current System Date and time in the format
    *6/24/2009 11:30:29 AM*
    How do i do it ?

    I seem to be saying this a lot lately.
    Google is your friend.
    I googled "java current date format" and SimpleDateFormat featured prominently in the results.

  • Validation on data and time format

    Hi
    In a flat file a date and time fill in but user.  And the data and time format should always be fill in with the format <DDMMYYYY> <HHMMSS>
    is there a FM which check whether user has put the wrong date format such as <YYYYMMDD> or <MMDDYYYY> instead for the the one mention above. 
    Please advise whether there is a FM which check on the format on the time stamp also.
    Note: the input of the data and time is done by the user.
    Thank

    Hi,
           use the new OOPs concept,
    PARAMETERS dateTYPE c LENGTH 10.
    DATA matcher TYPE REF TO cl_abap_matcher.
    * For date
    matcher = cl_abap_matcher=>create( pattern = `[0-9]{1,2}/[0-9]{1,2}/[0-9]{2,4}`
                                       ignore_case = 'X'
                                       text = date ).
    IF matcher->match( ) IS INITIAL.
      MESSAGE 'Wrong Format' TYPE 'I'.
    ELSE.
      MESSAGE 'Format OK' TYPE 'I'.
    ENDIF.
    like dis pattern for time : 
    [0-9]{1,2}:[0-9]{2}
    pattern for timestamp:
    [0-9]{1,2}/[0-9]{1,2}/[0-9]{2,4} [0-9]{1,2}:[0-9]{2}
    Code Formatted by: Alvaro Tejada Galindo on Jan 7, 2009 4:35 PM

  • How to change date and time format

    Hi experts,
    Can i know how to change the date and time format?
    I want the date format to be dd-mmm-yyyy  and time format to be hh:mm:ss
    These date and time is in my sapscript form.
    I make use of PERFORM function in sapscript.
    This is the code in my print program.
    FORM get_actlog_QA TABLES in_tab STRUCTURE itcsy
                           out_tab STRUCTURE itcsy.
       DATA: object TYPE string, "
            qaname LIKE JCDS-USNAM, "NAME for engineering process, QA Manager
            qadate LIKE JCDS-UDATE, "DATE changed in engineering process, QA Manager
            qatime LIKE JCDS-UTIME. "TIME changed in engineering process, QA Manager
    DATA: lt_jcds type standard table of jcds,
          wa_jcds like line of lt_jcds,
          new_date(10) type c.
      READ TABLE in_tab INDEX 1.
      MOVE in_tab-value TO object.
      select * into CORRESPONDING FIELDS OF TABLE lt_jcds
      from jcds WHERE objnr = object
        AND  ( stat = 'E0005' )
        AND inact = ''.
      Loop at lt_jcds into wa_jcds.
          qaname = wa_jcds-USNAM.
          qadate = wa_jcds-UDATE.
          qatime = wa_jcds-UTIME.
       READ TABLE out_tab INDEX 1.
       MOVE qaname TO out_tab-value.
       MODIFY out_tab INDEX sy-tabix.
       READ TABLE out_tab INDEX 2.
       MOVE qadate TO out_tab-value.
       MODIFY out_tab INDEX sy-tabix.
       READ TABLE out_tab INDEX 3.
       MOVE qatime TO out_tab-value.
       MODIFY out_tab INDEX sy-tabix.
      endloop.
      clear wa_jcds.
      ENDFORM. 
    This is my PERFORM in sapscript.
    /:           DEFINE &V_QANAME& = ''.
    /:           DEFINE &V_QADATE& = ''.
    /:           DEFINE &V_QATIME& = ''.
    /:           PERFORM GET_ACTLOG_QA IN PROGRAM ZFIR002
    /:           USING &VIQMEL-OBJNR&
    /:           CHANGING &V_QANAME&
    /:           CHANGING &V_QADATE&
    /:           CHANGING &V_QATIME&
    /:           ENDPERFORM.                     
    Sapscript
    Prepared by : &V_QANAME& ,, &V_QADATE& ,, &V_QATIME&
    The output now is
    Prepared by: Name   20080312  115536 
    I want to change the date format to 12-MAR-2008
    and the time format to 11:55:36 
    Can anyone please suggest on how to solve this?
    Thank you.

    Hi,
      Before assigning the  QADATE value you can write the logic to display  20080312   as  12-MAR-2008  taking the offset values .
    Like
    qadate = wa_jcds-UDATE.
    qatime = wa_jcds-UTIME.
      lw_year    = qadate(4).
      lw_month = qadate+4(2).
      lw_date    = qadate+6(2).
    case lw_month.
    when 1.
    when 2.
            concatenate lw_date  '-FEB-'  lw_year into qadate.
    when 3.
          concatenate lw_date '-MAR-' lw_year into qadate.
    endcase.
    READ TABLE out_tab INDEX 2.
    MOVE qadate TO out_tab-value.
    MODIFY out_tab INDEX sy-tabix.
    And you can also change the timeformat also  .
    then assign that value to qatime .Then
    READ TABLE out_tab INDEX 3.
    MOVE qatime TO out_tab-value.
    MODIFY out_tab INDEX sy-tabix.
    I think this helps you.
    Regards,
    Rajitha.

  • Date and time formatting not responding

    I'm trying to total a column based on a date or date window.  My formula looks like this.
    SUMIF(Date,B1,'$')
    I have 2 tables.  The table with the formula references the other table, and compares Date in table 1 to B1 in table 2.  B1 is a date I enter to see a specific total for that day only.  It only works if all the times of the date window are 12:00:00 AM.  , and the B1 times are the same ..... Even though times are unimportant to the totals I need, and both are formatted to "none" and do. It show.
    So, how do I total a specific date with various times, but all the same date?  I have a sample file if it will make more sense to see it.
    Not that it matters, but I am doing this on an iPad, but the formula still did not respond correctly on Mavericks either.  Unless I set all times equal to B1.
    Sorry if I didn't explain very well.  I'm new at this formula thing. 
    Thanks
    Jeff

    Hi Jeff,
    The entered date in B1 will have it's time part set to 00:00:00 (midnight, at the beginning of that date). To use SUMIF to filter the date and time values in Table 1, you would need to write a single condition that would accept all date and time values falling on the date in BI, and reject all date and time values falling on days before or after that date.
    SUMIFS allows you to specify multiple conditions, all of which must be met to acept a test value and add its associated sum value to the total. Here's an example:
    The formula in B1 of Table 2 is shown below:
    B2: =SUMIFS(Table 1 :: B,Table 1 :: $A,">="&B1,Table 1 :: $A,"<"&(B1+1))
    Syntax: =SUMIFS(sum-values,test-values,condition,test-values,ˆcondition)
    Regards,
    Barry

  • How do you change the date and time format in Pages

    I've tried changing the date and time format a number of times for Pages but it does not change.  I'm going to the System Preferences/Language and Text and Formats.  I make the changes click on OK and go back to Pages.  NO change.

    Hi Uncle,
    Page 116 of the Pages'09 User Guide: Control Click the date, Edit Date and Time.
    Date and time can also be in a table. Format the table cell.
    The User Guide is well worth a read. Download it from the Help menu in Pages.
    Regards,
    Ian.

  • Please fix date and time formatting in Hub and Calendar

    Hello,
    During initial setup I have used "English" as a setup language, but have since then changed it to "Croatian".
    In BlackBerry Hub, Calendar and Lock screens day and month names are still displayed and formatted in English.
    I noticed this bug briefly reported in another thread, but it is burried and not clearly visible, hence I'm putting it here by itself.
    This screenshot of Hub list proves language is in Croatian, but you can see "Friday, Augus..." in the swipped BlackBerry Hub.
    In addition to resolving this bug, please consider implementing "formatting" setting under "Date and Time" so that a user can pick a formatting that is indipendent of their language. For example, a short list of predefined selections such as:
    <Day name>, <Month name> <Day number>, <Year>
    <Month day> <Month name>, <Year>.
    <Year>-<Month number>-<Day number>
    Thank you in advance for your consideration. Regards,
    Hrvoje Solc

    Can you describe your problem a bit more. How are you passing the data, what is the error being seen in excel

  • Not able to adjust date and time - format does not permit

    Hello,
    I just scanned one old photo as a JPG and then imported it to Aperture 2, I renamed the file 1976-07-01_01.jpg based on the date the pic was taken. Then I tried to adjust the date and time in Aperture but got this error window:
    "Unable to adjust master file
    Aperture was not able to adjust the date and time of the master file "pic.jpg" because it has a format that does not permit date modification."
    What next?

    I am having a similar problem. The time is off by 12 hours exactly (ahead). When I touch date and time, screen goes black for less than a second and then reverts to main screen with all of the icons. I have first generation touch and just noticed this problem. All of the software is up to date. Any one know of a fix for this?

  • Date and time format please

    I have a date and time held separately eg. int day, int month, int year. same with hours seconds and minutes
    Is there an easy way to format this information into date and time please!!

    You might just build a string and convert it to a Date.
                     import java.util.*;
                     import java.text.*;
         /** getDateFromString converts a String to a Date according to the szPattern format.
          ** The szPattern format is based on a SimpleDateFormat custom format
          ** or the Date.toString( ) output format as a default
         public     Date     getDateFromString( String stringDate, String szPattern )     {
              SimpleDateFormat dateFormatter;
              Date myDate = new Date( );
              if( szPattern.length( ) <= 0 )
                   szPattern = new String( szDefaultPattern );
              dateFormatter = new SimpleDateFormat( szPattern, currentLocale );
              try {
                   myDate = dateFormatter.parse( stringDate );
              } catch( ParseException e ) {
                   P.rintln( e );
              return( myDate );
         }The following class variables are defined elsewhere:
    currentLocale = new Locale("en","US");
    szDefaultPattern = "EEE MMM d HH:mm:ss z yyyy";
    HTH,
    James

  • How to set the date and time format from Windows Server 2008 R2

    Hi,
    I want to control my client's date and time format as dd/mm/yyyy format and I need to do it using the windows server 2008 R2. How can I achieve this goal?
    Yoshika04

    Hi,
    In Windows Server 2008 R2, you can use Regional Options Extension in Group Policy Preferences to configure the date and
    time format. For more information, please refer to:
    Regional Options Extension
    http://technet.microsoft.com/en-us/library/cc754496.aspx
    Regards,
    Bruce

Maybe you are looking for

  • May seem silly, but I can't seem to cut and paste from delta computer services (land role) to google docs

    How can I cut and paste from Delta Computer Systems (land roles) to Google Docs using my new MacBook Pro?

  • BEx Maps

    Hello, at the moment we are using BEx Maps (Release SAP BW 3.5; Front-End Excel 2003). We are facing following problem: after saving the workbook with the embedded map for documentation as a .xls file and reopening it, we get a map with default value

  • Can't create BAM Sensor Action - XSD schema file exists

    Hi, In JDeveloper, I created some activity sensors and when I try to create a BAM sensor action it complains about the schema definition of the variable and that it should not be inline in the WSDL. The fact is that my BPEL process communicates with

  • SAP SRM- Portal supplier checkbox disappears

    Hello Gurus, I am trying to create bidders for RFX/Auctions.I am able to mark the supplier as "portal supplier" and change is being saved. But when i open the supplier i find that the checkbox has disappeard. Any idea why this is happening? Because o

  • Create SAP Service into the same solution.

    Hi Experts, Need help for creation SAP service which is always in running mode like a Alert management. Right now i am going to develop new AddOn for SMS Integration. In that i need active service which is runing in back end and when i am going to pl