Save Selection w/ Current Date

We have a dashboard prompt that has the business unit and the current date, among other fields. We need to set the business unit as a default saved selection for a group of users. The problem is, the date is also saved in the selection instead of defaulting to the current date. Is there a way around this—to set a saved selection for the business unit, but not the current date?
Thanks in advance for any suggestions!

Hello Vb,
This script *shows the created date of a file*. Maybe you can do something with it. With a small change it get the date from the finder add adds it to the file.
set selectedFile to (choose file)
tell application "Finder"
set modDate to the modification date of selectedFile
end tell
display dialog "That file was last modified on: " & modDate
This scripts shows *how long ago the file was created*:
--Part 1:
set selectedFile to (choose file)
tell application "Finder"
set modDate to the modification date of selectedFile
--Part 2:
set curDate to the current date
--Part 3:
if (the year of modDate) ≠ (the year of curDate) then
set ageInYears to (the year of curDate) - (the year of modDate)
display dialog "The file was changed " & ageInYears & " years ago."
--Part 4:
else
if (the month of modDate) ≠ (the month of curDate) then
set ageInMonths to (the month of curDate) - (the month of modDate)
display dialog "The file was changed " & ageInMonths & "months ago."
--Part 5
else
if (the day of modDate) ≠ (the day of curDate) then
set ageInDays to (the day of curDate) - (the day of modDate)
display dialog "The file is " & ageInDays & "days old."
else
display dialog "The file was changed today."
end if
end if
end if
end tell

Similar Messages

  • How to save file as "current date-current time"

    Hello,
    I'm trying to rename a file as from file.mov to "current date-current time"movie.mov, So the final product should be something along the lines of 08-18-08-12:59:08movie.mov (or whatever format the current date/time is in osx). Any ideas on how I would go about this? Thanks again!

    Hello Vb,
    This script *shows the created date of a file*. Maybe you can do something with it. With a small change it get the date from the finder add adds it to the file.
    set selectedFile to (choose file)
    tell application "Finder"
    set modDate to the modification date of selectedFile
    end tell
    display dialog "That file was last modified on: " & modDate
    This scripts shows *how long ago the file was created*:
    --Part 1:
    set selectedFile to (choose file)
    tell application "Finder"
    set modDate to the modification date of selectedFile
    --Part 2:
    set curDate to the current date
    --Part 3:
    if (the year of modDate) ≠ (the year of curDate) then
    set ageInYears to (the year of curDate) - (the year of modDate)
    display dialog "The file was changed " & ageInYears & " years ago."
    --Part 4:
    else
    if (the month of modDate) ≠ (the month of curDate) then
    set ageInMonths to (the month of curDate) - (the month of modDate)
    display dialog "The file was changed " & ageInMonths & "months ago."
    --Part 5
    else
    if (the day of modDate) ≠ (the day of curDate) then
    set ageInDays to (the day of curDate) - (the day of modDate)
    display dialog "The file is " & ageInDays & "days old."
    else
    display dialog "The file was changed today."
    end if
    end if
    end if
    end tell

  • Current date parameter in concurrent program is not not taking current date

    Hi All,
    I have scheduled one concurrent request running very day @21:30 ,one of the parameter passed is current date ,which defined as default value at the time of defining concurrent program.Surprisingly its taking next day date as parameter.Can someone help me resolving this issue.
    From where this current date is taken.
    When I am logged in unix as oracle user and executing following query I am getting follwoing results
    SQL> alter session set nls_date_format='MM/DD/YYYY HH24:MI:SS';
    Session altered.
    SQL> select current_date from dual;
    CURRENT_DATE
    05/25/2010 07:40:11
    SQL> select sysdate from dual;
    SYSDATE
    05/25/2010 07:40:20
    date
    Tue May 25 07:40:35 SAUST 2010
    When I logged in unix as applmgr user:
    SQL> select current_date from dual;
    CURRENT_DATE
    05/25/2010 04:41:17
    SQL> select sysdate from dual;
    SYSDATE
    05/25/2010 07:41:19
    date
    Tue May 25 07:41:04 SAUST 2010
    Unix level date is correct and sysdate is also correct in both cases.
    But current_date when logged in s applmgr user is wrong,is this reason for the issue.
    If so how can I change it
    Version : 11.5.10.2
    Database : 10.2.0.4
    OS : AIX 5.3
    Thanks in advance

    Hi;
    Please check below and see its helpful:
    Scheduled Request Set Using 'Current Date' In Parameters Will Set Parameters One Day Out [ID 242654.1]
    The parameter Argument 2 (GL DATE) does not select the Current Date when schedule [ID 250431.1]
    Regard
    Helios

  • How to display the current Date and time in xslt version 1

    i am using xslt version 1 .i want to display the current date and time in the output xml using xslt(Jdeveloper) ..i just added the namespace xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
         xmlns:ns1="urn:oracle:integration:b2b:7D30046DC68A4FA689956D8241FA3B99">
    and used thsi function <xsl:value-of select = "xp20:current-date()"/>
    but it does not works for me ..help needed????
    Edited by: user9519185 on Jan 20, 2009 3:04 AM

    Use a formula: =NOW()
    Format the cell for Date and Time, with both the Date part and the Time part displayed. Format the two parts as you wish, using the choices in the Inspector's menus.
    The cell will update each time the table is recalculated.
    (Description is for Numbers '09 (Mac), Numbers for iOS will be similar, but not necessarly identical in details.)
    Regards,
    Barry

  • Error in Current Date in XSLT Mapping

    Hi Experts,
      I am having a problem in Dispaying the current Date and Time ( or System Date and Time ) .As per my Project Requirements I need do XSLT mapping
    My XSLT Mapping Looks like
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:a="http://XYZ.eu.ABC.com">
    <xsl:template match="/">
    <a:A2A>
        <a:PNo>
             <xsl:value-of select="Path/Path/PNO"/>
       </a:PNo>
       <a:Rev>
             <xsl:value-of select="Path/Path/REVISION"/>
       </a:Rev>
       <a:Current Date>
             <xsl:value-of select= ""/>
       </a:Current Date>
       <a:Current Time>
             <xsl:value-of select= ""/>
       </a:Current Time>
    </xsl:template>
    </xsl:stylesheet>
    Can any one please let me is there is any function to  dispaly the Current Date and time.

    Hi ..
    I just tried executing both the maps.. Both of them excutes well in both XMLSpy and Stylus Studio .. But having below problems in Executing in PI
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
    <xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/>
    <xsl:template match="/aaa">
    <xxx>
    <xsl:value-of select="current-dateTime()"/>
    </xxx>
    </xsl:template>
    </xsl:stylesheet>
    Then I got the error
    javax.xml.transform.TransformerException: com.sap.engine.lib.xml.util.NestedException: Function with name 'current-dateTime' not found in context library.
    with
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:datetime="http://exslt.org/dates-and-times"
    exclude-result-prefixes="datetime">
    <xsl:template match="/">
    <currtime>
    <xsl:value-of select="datetime:dateTime()" />
    </currtime>
    </xsl:template>
    </xsl:stylesheet>
    I have got
    Unable to find resource http://exslt/org/dates-and-times.class (http://NAMESPACE Name) in the following software component versions: 0fe18820-410a-11dd-979b-dc8591374305

  • How to Get Current Date from MS Access in a Select Statement

    From a java method, I want to use JDBC to get the current date from MS Access. In Oracle I would do "select sysdate from dual", but I can't figure out how to do it in MS Access. Here are some of my attempts. I have a table in my Access db called PARM.
    //        String sql = "SELECT '0', NOW() FROM PARM";
    //rs.next() is false
    //        String sql = "SELECT NOW() AS CURR_DT FROM PARM";
    //rs.next() is false
    //        String sql = "SELECT DATE() AS CURR_DT FROM PARM";
    //rs.next() is false
    //        String sql = "SELECT NOW()"; 
    //StringIndexOutOfBoundsException: String index out of range: -1
    //        String sql = "select { fn now() } from parm";
            String sql = "SELECT Date()";
    //java.lang.StringIndexOutOfBoundsException: String index out of range: -1
            ResultSet rs = stmt.executeQuery(sql);
            if (rs.next()) {
                return rs.getString(1);
            } else {
                   return null;
              }

    Why are you getting it as a String? You should be getting it as a timestamp.
    Although getString works for me too. There is something else wrong that you haven't shown.
    Here is some shoddy, but simple, test code that demonstrates it working.
    import java.sql.*;
    public class Test{
      public static void main(String args[])throws Exception{
        Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
        Connection c = DriverManager.getConnection("jdbc:odbc:stats");
        Statement s = c.createStatement();
        ResultSet rs = s.executeQuery("SELECT NOW()");
        while(rs.next()){
          System.out.println(rs.getTimestamp(1));     
        rs.close();
        s.close();
        c.close();
    }

  • Default selection on current month, week and date

    Hi,
    We are on Dashboard 4.1 sp3 the same version as BI.
    The dashboard report is using LiveOffice connection. We are now facing an issue with default selection on current month, week and date.
    The dashboard report drilled down from month, to week, then to date. The dashboard feed -live office report is on month/week/date ascending order - becuase we have running average calcualtion on LO report, it seems have to be in ascending order to get the correnct runnning average.
    I tried to on Insertion to change default seletion, it works on month, but it doesnt working on week and daily.
    but when LO report is on ascending order, on dashboard column chart the default selection is not on the current month, week and date.
    Is there a way to solve the issue. Could anyone please help.
    Thanks,

    Hi Suman,
    Thanks for the quick reply.
    Do you mean I Enable sorting -by categrory labels on Behaviour - common tab.
    Thanks,

  • Dynamic Variant -Current date  in selection screen - for batch jobs

    Hi Experts,
    My report runs in batch job with a variant, daily.
    One of the filed in selction screen should hv CURRENT DATE, with out providing as input explicitly by user.
    So, How Can I get it done?
    Its some thing with Dynamic variants + Selection Variables +  date selection, but, I forgot the navigation etc.
    pl. let me know
    thanq

    thanq.
    and pls. let me further clarify that,
    programitically am populating the date as current date minus 1 in the field of my_date in the selection screen.
    now, they wanna to run the report in back ground, daily.
    now, I followed ur tip/link and saved with_date_variant, fine.
    so, pls. let me know that,
    1) if the report runs in back ground tomorrow with with_date_variant(which is i created by seeing ur link), Is the selection screen my_date(prog. populates as June 5th) will be override with current date(i.e. June 6th)?
    In broad, Is the selection criteria wuld be over writes with the Dynamic varints?
    thanq

  • Lock current date after save

    In the form I am working on I have a current date field.  When the user saves the form I would like that date to be locked so when the form gets emailed to me and I open it, I can see whent the user sent it.
    Is this possible?  Any help would be great.

    Still having a problem....not working.  Next time I open the form (I've forced a date change on my pc) and it changes to the current date.  Is this correct?
    form1.#subform[0].CurrentDate::preSave - (JavaScript, both)
    if(this.value!=null)
              this.access="readOnly";

  • Selection screen must show current date + 1

    Hi Guys,
                   In my selection screen i have given
    parameters: date like sy-datum default sy-datum.
    I have added + 1 after sy-datum.
    But i am not getting tommorows date.
    So can I display current date = current day + 1 Day in selection screen itself.
    Thanks,
    Prasad.

    parameters: date like sy-datum default sy-datum.
    INITIALIZATION.
    DATE = sy-datum + 1.          " Tommorows date will be display on the selection screen.
    OR:
    parameters: date like sy-datum default sy-datum.
    AT SELECTION_SCREEN OUTPUT.
    DATE = sy-datum + 1.
    Regards,
    Gurpreet

  • Setting only the TO field on the Created on Field in Selection screen to Current date

    Hello,
    We have a requirement to Set only the To date in the Created on Field in Selection screen to the Current date, I have tried through Dynamic variable option to set the Date calculation but I am able to see Options to set the Current date to From or From and To Created on Date fields instead of setting the Current date only to To created on Field.
    We are in 4.7 and are not supported with user defined variables, Appreciate your inputs on this.
    Thanks and Regards
    Mohammed Roshan

    >
    sunitha j wrote:
    > Hi ,
    >
    > It would br gr8..if u could give some more info about the usage of this class..i mean if i hav to implement it in my program....wat is the necessary data that needs to b copied...
    >
    > Thanx,
    > Sunitha
    what Text field you want to change.
    Since you are working with Dynpros , you have to split the screen in two parts, and one for the Showing differenet fonts and other your normal Dynpro information.
    you need to use the Method ADD_TEXT Did you check the program DD_STYLE_TABLE.

  • Selecting based on current date

    I wonder how I can set a value in a table based on the current date. I have viewed most of the posts and I found that it is straight forward to get current date. But my problem is to pass that current date for the comparison in my select statement. For example
    I can get date using the select statement but I don't know how to use it in the next select statement. See below
    select sysdate
    from dual;
    Like here,
    UPDATE PAYMENT (payment_date)
    SET (sysdate) /* this does not work */
    WHERE pid='8';
    So what do I need to do to set the payment_date field correctly? (for the reference my PAYMENT table is shown below for clarity)
    CREATE TABLE PAYMENT     
         (pid          VARCHAR(15)          NOT NULL,
         rid          VARCHAR(15)          NOT NULL,
         payment_date     DATE,               
         due_date     DATE,
    PRIMARY KEY(pid));
    I would very much appreciate your response. Thank you.
    Edited by: user10653046 on Nov 30, 2008 12:30 AM

    If I'm not mistaken, you are asking about the basic syntax of an UPDATE statement?
    You can find that in the SQL Language Reference. A link to the part where it talks about the UPDATE statement: http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/statements_10008.htm#SQLRF01708
    An example:
    SQL> CREATE TABLE PAYMENT
      2  (pid VARCHAR(15) NOT NULL,
      3  rid VARCHAR(15) NOT NULL,
      4  payment_date DATE,
      5  due_date DATE,
      6  PRIMARY KEY(pid));
    Tabel is aangemaakt.
    SQL> update payment
      2     set payment_date = sysdate
      3   where pid = '8'
      4  /
    0 rijen zijn bijgewerkt.Regards,
    Rob.

  • How to save current date into a veriable

    I am using Cisco Unity Express Editor 3.2.1
    I want get the current date, today, from the ssytem and then save into a "date" veriable.
    How can I do that?

    options (skip=2)
    load data
    badfile 'C:\CAP_SPS\Batchscripts\psafixbad.txt'
    discardfile 'C:\CAP_SPS\Batchscripts\psafixdiscard.txt'
    append
    into table sps_psafix
    when record_layer='Project'
    fields terminated by ','
    trailing nullcols
    record_layer position(1),
    file_name,
    attr1,
    attr2 filler,
    attr3 filler,
    attr4 filler,
    attr5 filler,
    attr6 filler,
    attr7 filler,
    attr8 filler,
    read_flag constant '0',
    date_column_name SYSDATE
    )SY.

  • How to create a Date or time field that automatically saves current date or time?

    hello,
    i want to know that how to create a Date/Time field that automatically shows current Date/Time when .pdf form is opened.
    also want to how to stop user to give input in Date/Time field
    currently im putting a Date field but it is accepting user input.
    hoping for quick response
    Thanks in advance!

    You can place the below code in the initialize event of the field to display the current date and time.
    Set the language to FormCalc.
    You can play around the formats to get the desired format of date and time.
    if($.rawValue eq null or $.rawValue eq "") then
    $.rawValue = Concat(Num2Date(Date(), "MM/DD/YYYY")," ", Num2Time(Time(), "h:MM:SS A"));
    endif
    You can not restrict the input area in Date time field instead you can validate the input while existing the field.
    (OR) set the field to either readOnly or protected mode.
    Thanks
    Srini

  • How to get the "current date" in the BEx?

    Hi all,
    I need to get the "current date" in my Bex report in order to make a comparison. I know there is a "How to" which shows how to get the current date via a User Exit, but I didn't find it. Could you please help me?
    Thanks

    1. Create a  New Formula in Key Figures structure
    2. Give tech name and description and Select "New variable" option
    3. Next screen will launch Variable Wizard -> create a new variable with replacement path as processing type
    4. in next screene  select the date characteristic that represents the first date to use in the calculation (From Date)
    5. In the next  screen select Key in the Replace Variable with field. Leave all the other options as they are
    6. In the next Currencies and Units screen select Date as the Dimension ID.
    6. Save variable
    repeate the Above steps to create another variable (To Date)
    and now you can use these two new replacement path variables in your new formula.
    Dev

Maybe you are looking for

  • Performance Issue on Traditional Import and Export

    Scenario ===== Oracle 9i Enterprise Edition (9.2.0.8) Windows Server 2003 (32 bit) --- to --- Oracle 11g Enterprise Edition (11.2.0.3) Windows Server 2008 Standard R2 (64 bit) Hi to all I'm doing a upgrade from 9i to 11g and i am using native imp/exp

  • InDesign, Illustrator and Photoshop crashing after recent file download

    I recently downloaded what I thought was a font online. Photoshop, InDesign and Illustrator now all fail to open. I will never foolishly download anything online again. Can anyone help me get Photoshop, InDesign and Illustrator running again? More in

  • Pass DATA_PARAMETER to Report in 10g

    I have a form which will pass a Record Group to the Report as a parameter list, it works in 6i but when I migrate to 10g, the report cannot be run. In the Form : A record group named 'Q_QUERY'with 2 columns named 'APPLY_AGT' & 'STATUS' was built and

  • Audio out port doesn't work well

    Hi, I have a Macbook Pro 13-inch, Early 2011. Since I bought it I always use my Mac whit headphones, but since a month it only works well the left headphone. I think that the problem it was my headphones but no, because I used it on my phone and work

  • E71 wlan issue after firware upgrade

    I just upgraded by E71 to the latest software version. The upgrade went without any issues. After the upgrade I realised that t had removed all my contacts - so I had to restore my backup(I restored the SETTINGS as well). I was using a app for my 'Wi