Date and time difference for weekdays - urgent

Hi,
Is there any fun.module which will caluculate the difference between two dates and time  excluding weekends?
Thanks in advance.
Srini.

Hi,
Refer to the following link:
http://sap-img.com/abap/function-to-return-next-business-day.htm
Hope this helps.
Reward if helpful.
regards,
Sipra

Similar Messages

  • SAP BI Date and Time Difference calculations in DSO Transformation

    Hello Guys,
    Could you please tell me how to calculate the date and Time difference between 2 fields.
    I have 2 date fields :
    Arrival Date : 6/16/2007
    Departure date : 6/19/2007
    Also i have 2 time fields for the above
    Arrival Time : 13:00:00
    Departure Time : 11:50:00
    I want to display all the four fields and 2 fields for the difference in Date and Time.
    Is it better to calcuate the differences in DSO Transformation or can you do it in the report itself.Could you please let me know the solution.
    Thanks,
    BI Consultant

    Hello Consulant BI,
    Computing the difference of two dates is easy (assuming you really just want the number of days). You can simply subtract the two dates using ABAP:
    data: w_arrival_date type sy-datum,
            w_dep_date type sy-datum,
            w_diff type i.
    w_arrival_date = <your arrival date field here>.
    w_arrival_date = <your departure field here>.
    w_diff  = w_arrival_date - w_dep_date.
    Getting the time difference isn't really much logical. I think what you want instead is to compute the totals days (and extra hours) right? If this is the case, then you can convert the date+time for both the arrival and departure  into a timestamp variable first and then t the get difference.
    Hope this helps.

  • TS4000 What is the "correct" date and time settings for icloud reminders?

    What is the "correct" date and time settings for icloud reminders?

    Sep. 18th. We don't know what time.

  • How to find the date and time difference in InfoPath 2013?

    Hi All,
    My date and time format is like: 2013-12-24T10:47:38 and have three fields Start date, End date and Actual time taken.
    If start date and end date filled then actual time taken field should automatically should fill, for example 2 days 12 hours 48 min 3 sec.
    How to achieve this?

    Hi Sam,
     I believe we had discussed the same issue in the below thread. Can you please refer the below one?
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/d93e16ff-c123-4b36-b60b-60ccd34f6ca7/calculate-time-differences-in-infopath?forum=sharepointcustomizationprevious
    If it's not helping you please let us know
    Sekar - Our life is short, so help others to grow
    Whenever you see a reply and if you think is helpful, click "Vote As Helpful"! And whenever
    you see a reply being an answer to the question of the thread, click "Mark As Answer

  • Readind Date and Time from a folder.Urgent help please

    Folks,
    I need some help regd reading of date and time from a folder.
    I have a folder which has 5 files.
    I need to read these files along with the date and time
    The date and time has to be in the format:
    mm/dd/yy and the time in 11:55
    I am attaching my code below,
    The f.lastModified() doesnt display the data in the current format
    Can some one please please help me to get the data in the format defined above
    private void readFoldert(){
       String folder = "/images/";
       File f1 = new File(folder);
       ArrayList al = new ArrayList();
        if(f1.isDirectory()){
         String s[] = f1.list();
          for(int i=0; i<s.length;i++){
             al.add(s[i] + f1.lastModified);                    
    } // End of if.
           

    Here's how to format a time. I hope you can figure out how to format a date:import java.text.*;
    import java.util.*;
    public class Test {
        public static void main (String[] parameters) {
            Calendar calendar = new GregorianCalendar ();
            calendar.setTimeInMillis (new java.io.File ("c:\\windows").lastModified ());
            System.out.println (DateFormat.getTimeInstance (DateFormat.MEDIUM).format (calendar.getTime ()));
    }Kind regards,
      Levi

  • How to get exact date and time difference?

    Hi,
    When i am using the below sql statement:
    SELECT (TO_DATE('7/27/2006 05:00:15 PM','MM/DD/YYYY HH:MI:SS PM') - to_Date('7/27/2006 8:30:13 AM','MM/DD/YYYY HH:MI:SS AM')) * 24 hours FROM DUAL;
    the output is:
    Hours
    8.50055555555556
    But Actually it is 8.30
    So how can i get exact days and time difference between two dates in Oracle?
    Thanks....
    Regards,
    Suman Sakinala
    Edited by: SSN on Sep 19, 2008 1:27 AM

    Or more clearly (this time I have my date_from and date_to the right way around hehe!)
    SQL> ed
    Wrote file afiedt.buf
      1  WITH t as (select TO_DATE('7/27/2006 05:00:15 PM','MM/DD/YYYY HH:MI:SS PM') as dt_to,
      2                    TO_DATE('7/27/2006 08:30:13 AM','MM/DD/YYYY HH:MI:SS AM') as dt_from FROM DUAL)
      3      ,d as (select (dt_to-dt_from)*24 as diff_hrs from t)
      4  -- end of dates
      5  SELECT TRUNC(diff_hrs) as hours
      6        ,TRUNC(((diff_hrs) - TRUNC(diff_hrs))*60) as mins
      7        ,TRUNC(((((diff_hrs) - TRUNC(diff_hrs))*60) - TRUNC(((diff_hrs) - TRUNC(diff_hrs))*60))*60) as secs
      8* FROM d
    SQL> /
         HOURS       MINS       SECS
             8         30          2
    SQL>

  • Date and Time Issue for Mult Org...

    Hello,
    How can I manage the date time, if my organizations have different plant and location?
    I.e. The database server located in Pacific Time zone and the application may access from new plant German time zone.
    Whenever the German business center enters any sales transaction it should take German current date and time instead of Pacific Time.
    Pls advice me
    Thanks,Raghu.K

    Hi,
    While defining a Location, you can mention the time zone for that location and also the inventory organisation to which this location belongs.
    So, this location can be assigned to your organisations. You can access the time zone according to the location you select.
    regards

  • Date and Time adjustments for multiple photos

    Hello, thanks for providing the space for new users, and thanks in advance for your assistance.
    I am currently moving out of apple aperture/iphoto and across to lightroom 5.
    The OCD part of me likes to have my library organized, and I noticed that when I transferred my library across it is in a bit of a mess, so I am currently in the process of organizing the library and cleaning it up (approximately 18000 photos)
    Any how, I have almost settled on a folder structure (YYYY/MM - I feel for the number of photos I have trying to nut down to day might be to much - happy to receive advise on this also)
    For the most part, the photos have correct date and time from the commencement of the digital era (for me 2006 onwards)
    Photos pre 2006 are in negative form, and I am currently in process of having these scanned and imported into library, I have a batch done every month.  Adjusting the date and time from the creation date is where I am running into trouble.
    I have looked around the web and various forums to no avail.
    Firstly, I organize the photos into the correct order.  I then select the first photo and the then select the remaining photos.  I then select the adjust date/time from the menu and select the first option, adjust to new date and time, lets say 01/01/1990 at 1200 PM.
    The result I end up with is the first photo (the more selected photo if correct term) has 01/01/1990 @ 1200 as date and time, the remaining have 01/01/1990 as date (if I am lucky), and the times jump all over the place.  Sometimes it wont even change the date time for the remaining photos.
    What I am trying to achieve is either the same Date/Time for all the photos when I select a batch, or have them increment in time by a standard amount (i.e 1 minute (1200/1201/1202) or 1 second (1200:00/1200:01/1200:02)), and I just dont seem to be able to work this out to automatically do this, currently I have to achieve this by a manual adjusting each photo (some 200 at a time) which is really labor intensive
    Thanks in advance, and hoping an easy solution
    Regards
    Dean

    Thanks, that seemed to fix the problem.
    Workflow is:
    1) In grid view arrange photos in correct order
    2) Rename photos with a name & sequence (i.e. photos-1), this appears to then keep the photos organized as how I had arranged in grid view
    3) Export photos & delete original photos from my master library
    4) Open exported photos in an EXIF editor and change date & time to a common format (I am currently using the seasons as a guide, i.e. the photos that I recall being taken in spring are dated the first day of spring, using noon as the time)
    5) Import back to Lightroom and organizing as per my usual structure.
    This has allowed me to easily batch change date and times, keeping the correct order and has drastically reduce my workload, thanks for the suggestion!

  • Does photoshop have a simple date and time stamp for photos taken?

    I am an enforcement office and require date and time to be printed on my photos. Does this app give me that feature?

    HI Lbheobrown,
    I think this might be too specialized a feature to be something that every Photoshop Touch user would need/want. I went to the app store and just did a search for "timestamp" (no qoutes with the actual search). I did find some apps that read the metadata and can add timestamp info to photos. You might be able to timestamp your photos first with some other app then import the images into PS Touch.
    Some of the apps I saw were
    - StampPhoto - added timestamp and geotagging location info (included a little map of the location on the photo itself)
    - phoTime - has a camera button in the app that adds the timestamp at the bottom as photos are taken
    - Timestamp It! - New and existing photo support, change text color, custom date and time entry support
    You might investigate these further, all were in the $1 app price range
    Hope that helps,
    -Dave

  • Date and time stamp for movie. How?

    I need the date of a movie--or clips from movies---made with a Flip camera.  How do I get that date to appear on the footage?

    Hi
    I never seen any way to do this in iMovie - any version (may be me to illitterated)
    But - I've used a way around - by going via Analog out from Camera (my can show date and time on TV) - then to an A/D-box (I use a Canopus ADVC-300 - now named Grass-Valley ADVC-300) and from this via FireWire to iMovie or FinalCut.
    Picture quality is lost this way (can be handled somewhat better in FCE/P) but it works.
    Yours Bengt W

  • Date and Time stamp for the archives

    Hi,
    I'm trying to set up a date/time stamp field for a Documaker archive.
    I've added a TIME_STAMP field in my APPIDX.DFD and I populate the field using a DAL script, invoked by a PreTransDAL line in my AFGJOB file. That works fine but, the DAL script being invoked for every transaction, it adds to the processing time.
    I do not need an exact date/time stamp for each transaction in the batch, I could use the same one for all the transactions. That would require the TIME_STAMP global variable to be populated once, at the job level, at the beginning of each batch.
    Any suggestions?
    Thanks.

    Hi Gaetan,
    Try using a BatchBannerBeginScript to populate a GVM with the date/time, and then reference this GVM in your APPIDX.DFD. In this manner the value will be updated at the start of processing for each batch rather than each transaction. Or, consider the possibility of adding the transaction date/time into the extract data and then sourcing from that point. Either should work. In my experience most customers prefer that the archive date/time come from the system of record rather than the time the transaction was archived -- unless of course the customer actually wants to record the time the transaction was archived, in which case the method I've described above should work.
    Enjoy!
    Andy

  • Date and time stamp for the file

    Hi Experts,
    My Requirement is to create a csv file with the name testfile_date&timestamp.
    If i select add time stamp in the receiver file communication channel the file be as testfile_yyyymmdd_hhmmss_XXX.
    The XXX is message id which comes by default by selecting add timestamp option.
    but, i don't want the message id displayed in the file name.As i know from the blogs  we can reach this requirement as per Michels blog
    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
    I am not clear in the mapping. after writing the udf, to which filed i need to map with that udf.
    can you please tell me stel by step how how to do mapping and how to achieve the requirement. request you to send the code forthe  udf.
    Thanks
    Rahul

    Hi,
    you can wirte udf and map it to root element of the target message type. u just need to execute the udf.
    UDF:
    // UDF havs one input parameter - timestamp
    Code:
    DynamicConfiguration conf = (DynamicConfiguration) container .getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String OldFileName  =  conf.get(key);
    String newFileName  =  "";
    if (OldFileName != null) {
        newFileName = "testfile_" +timestamp ;
        conf.put(key, newFileName);
    return  newFileName; 
    Mapping:
    Date (standard function) [Formmat yyyyMMdd_hhmmss] -> UDF -> MesageType.
    Thanks.
    Ritu

  • Naming for Export dmp file in Date and Time

    Dear All,
    Please advise me how to give the file name in date and time stamp for the export dmp file and it's log file.Suggest me in Oracle 9i version.
    for example the file name get like this 020420041155.dmp and 020420041155.log where date and time are 02/04/2004 11:55 respectively...
    Kindly let me know the syntax of filename to be given along with the EXP command..
    Thanking You,
    Ragesh

    Hello
    I don't think you can get the exp command to automatically name an export for you. The only way I think you would be able to do it is through a shell script or something where you format the file name yourself and pass it to exp. If you wanted to you could generate the command line through a SQL statement and then spool it out to a file i.e.
    spool runexp.bat
    select 'exp user/pwd@tns file='||TO_CHAR(SYSDATE,'DDMMYYYYHH24MI')||'.dmp tables=(table1,table2)' from dual;
    spool offThe second option isn't as flexible as the first but if it's just a couple of exports you have to do, it will probably prove to be less work
    HTH
    David

  • I have a iphone 3 and want to know if there is a date and time stamp on the phone for the pictures

    is there a date and time stamp for pictures on iphone 3?

    Open a one of your pictures in any photo app on your computer and see if the metadata is there.  I'd be surprised if it isn't.

  • Insert current date and time into Oracle date type field

    I have a JDBC current date and time insert into Oracle 9i that almost works. It submits the current date and a fixed time into the Oracle date type field. I am using Tomcat 6.0.20.
    For example if I insert the data at 7:24:04 PM on Feb 16, 2010 it will insert as: 16-Feb-2010 12:00:00 AM
    The date part works but the time always shows 12:00:00 AM no matter what date or time the data is inserted.
    Here is what I have for my JDBC inserts and I also tried something with DateFormat:
    PreparedStatement ps; Date mydate = new Date(new java.util.Date().getTime()); //insert statement here.... stmt.setDate(1,mydate);
    I also tried:
    PreparedStatement ps; java.sql.Timestamp mydate = new java.sql.Timestamp(new java.util.Date().getTime()); SimpleDateFormat fmt = new SimpleDateFormat(.... //insert statement here.... ps.setTimestamp(1,fmt.format(mydate));
    Both keep submitting the date into Oracle as 16-Feb-2010 12:00:00 AM
    Anyway to get the current date and time? For example if I insert the data at 7:24.04 pm today it should show as 16-Feb-2010 07:24.04 PM in Oracle.

    sportsMarkr wrote:
    Date mydate = new Date(new java.util.Date().getTime());Please see the javadocs for java.sql.Date and note the part that says "...to zero"
    [http://java.sun.com/javase/6/docs/api/java/sql/Date.html]
    If you want a date and time then use java.sql.Timestamp.

Maybe you are looking for

  • Text Determination Sales document to sales document

    Hi Friends, We are configuring text determination sales document to sales document (ZOR to ZLR). We have done following configuration: 1. text type - Z122 ( invoice text header) 2.) test determination procedure Z1. In text determination procedure Z1

  • Error while using ego_item_user_attrs_cp_pub API

    Hello All, We are using ego_item_user_attrs_cp_pub API to insert UDA's in ego_mtl_sy_items_ext_b table. The API will pick the record from ego_itm_usr_attr_intrfc table and the following is the script used. DECLARE x_message_list Error_Handler.Error_T

  • LightweightDispatcher issue with Applets in Browser using Java 7, not 6

    Spent the last year at work setting up some GUI JApplets for demos our of code. The JApplets house a number of layers of JPanels and JComponents, but should have no heavyweight components as children. I've set up standalone applications that run one

  • Inner Classes Changing Access Rights Of Parent  Members

    I read that if you access a parent class's private memebers or methods from within an inner class, those members of methods will automatically and silently be converted to having package access. This seems dangerous and I'd like to know how I could d

  • FETCHING VALUES IN MULTI RECORD BLOCK FROM ANOTHER TABLE USING SELECT STATEMENT.

    Hi, I have one multi record block in which i want to fetch values (more then one record) from another table using select statement IN KEY NEXT ITEM.I am getting following error. ORA-01422: exact fetch returns more than requested number of rows Thanks