Date and Time

Insert date or time or both in to a file name
I would find it very usfull to be able to automate the prosseses of inserting the date ( in year mouth day order ) and the time in to a file name. This would allow the tracking of email saved as text in a sequential order. ie the file name would read subject date time. Is there a way of doing this with apple script ? I can not find any " get current date" or "get current time" comand. Is it posible to use apple script to open a sutable application and get the date and time from there ? anybody solved this ?

Is it the current date you want?
There are example AppleScripts in /Applications/AppleScript/Example Scripts. Under the subfolder Info Scripts is one that shows how to get date and time. Under the subfolder Finder Scripts are a number of rename scripts, including "Add to File Names".
Probably there are ways to change the format using the AppleScript current date command, but the shell command date is particularly flexible. For example, try this AppleScript:
set the time_stamp to (do shell script "date +%Y%m%d-%H%M%S")
display dialog time_stamp
Replace the "display dialog" line with code to change the file names. If you can read Unix man pages, see man date and man strftime for details on formating the date command.

Similar Messages

  • Date and Time in Sender File Adapter Target Directory

    Hi there,
    is there a way of using Date and Time from XI to the Target Directory naming? To use variable substitution some fields of the message had to contain that date and time information, which is not our case.
    For filename you can use "add time stamp" option, but and for target directory?
    Thanks and regards,
    Henrique.

    > <i>Do you have further information on how to perform
    > this with shell commands?</i>
    > >> You need to write a shell script. This script will
    > add the date/time stamp into the folder in the target
    > system. This shell script is executed from the File
    > adapter. So once the file is written into the target
    > directory, then it will rename the directory.
    Hi there, Moorthy
    We've tried to write that shell script that you mentioned, but now we have a few doubts on how to make it create the proper directory.
    In the file adapter, my target directory is "/%var1%/%var2%/", where %var1% and %var2% are variable substitutions, referencing data which comes from the payload. Now, I need the shell script to append "/<Year>/<Month>/" in the target directory. But where to archive the script? If it stays in the root directory, than how to make it create "/<Year>/<Month>/" folders inside a directory which is variable (/%var1%/%var2%/)?
    Is there a way of passing %var1% and %var2% as parameters for the shell script?
    Thanks a lot,
    Henrique.

  • Unable to insert date and time when using date datatype

    Hi
    I am hitting a bit of a problem when using the date datatype. When trying to save a row to the table where the field it throws an error ora 01830 and complains about converting the date format picture ends...etc. Now when I do the insert, I use the to_date function with the format of "dd-mon-yyyy hh24:mi:ss". Of course, when I remove the time element, everything is perfect.
    Checking sysdate, I noticed that the time element wasn't be displayed, and I used alter session set nls_date_format to set the date and time I want to save to the table, which worked!
    Then based on advice in a previous thread to permanently fix the problem, I used alter system set nls_date_format ="dd-mon-yyyy hh24:mi:ss" scope=spfile; This showed that it was altered, and I can see the setting in the em. In sqlplus, I shutdown the database, and restarted with startup mount; alter database open; and then selecting sysdate, it still shows the date as dd-mon-yy, and still no time! Checking the em, and looking up the nls_date_format the setting is still shown as "dd-mon-yyyy hh24:mi:ss".
    So, my question is this - what am I doing wrong? Why can't save date and time using date in Oracle 11g?????
    Thanks

    user633278 wrote:
    Hi
    I am hitting a bit of a problem when using the date datatype. When trying to save a row to the table where the field it throws an error ora 01830 and complains about converting the date format picture ends...etc. Now when I do the insert, I use the to_date function with the format of "dd-mon-yyyy hh24:mi:ss". Of course, when I remove the time element, everything is perfect.
    Checking sysdate, I noticed that the time element wasn't be displayed, and I used alter session set nls_date_format to set the date and time I want to save to the table, which worked!
    Then based on advice in a previous thread to permanently fix the problem, I used alter system set nls_date_format ="dd-mon-yyyy hh24:mi:ss" scope=spfile; This showed that it was altered, and I can see the setting in the em. In sqlplus, I shutdown the database, and restarted with startup mount; alter database open; and then selecting sysdate, it still shows the date as dd-mon-yy, and still no time! Checking the em, and looking up the nls_date_format the setting is still shown as "dd-mon-yyyy hh24:mi:ss".
    So, my question is this - what am I doing wrong? Why can't save date and time using date in Oracle 11g?????
    ThanksYou most certainly can save the time. A DATE column, by definition stores date and time. What you describe is a presentation problem, and setting nls_date_format at the system as an init parm is the weakest of all settings as it is overridden by several other locations.
    without seeing the exact sql that produced the error (not just your description of what you think you were doing) it is impossible to say for sure.
    However, I'd suggest you read http://edstevensdba.wordpress.com/2011/04/07/nls_date_format/

  • DVD camcorder (VIDEO_TS) - preserve clip date and time

    I had asked this question on the forums a long time ago but iMovie did not seem to be supporting it reliably at the time. But since some time has passed, I wanted to check if iMovie '09 can import clips from a mini DVD (those used in camcorders to capture video directly on to DVD media) AND preserve the clip's date and time.
    What I see is that the first clip gets some date and time related to the event's date and time (perhaps the start time of the first clip?) but all the other clips which are imported, get timestamps of 1 second after that first clip's timestamp.
    These are all my home videos and in order to keep each clip short, I have had the habit of pausing after about a minute or two, resulting in MANY clips over MANY DVD's, so manually updating date and time is absolutely the last resort.
    The DVD player can see the clip date and time correctly, and so could the camcorder (I have since sold the darn thing!) so I know that information exists somewhere in the DVD, but it seems like iMovie is unable to "see" it.
    Any help would be appreciated, including programmability hints.

    Thank you for your post.  I figured out why iMovie was assigning today's date to everything that I imported.  It turns out that many of my video files did not have a real "created" date--some had no date at all and some had Wednesday, December, 1967 or 9 (I think).  iMovie defaulted today's date in both of these situations.  I took your advice and ot A Better Finder Attribute and easily converted all of the files using the option to copy the "modified date" into the "created date" attribute.  Now everything imports correctly into iMovie.

  • How can I get rid of the dates and time on my Notes

    How do I get rid of the dates and times on my Notes that appeared when I updated to 8?

    Yes, it's seems like a poor design decision.
    By putting the date on the line below the Note title in the Notes Index, the app shows half the number of notes per page AND if you have a large number of notes, it takes twice as long to stroll down.
    I doubt the designer actually uses the app. 
    TSAW

  • How do I delete duplicate songs? (date and time stamp are identical

    I put my cd collection in itunes and now have duplicates of most songs (don't know how I did that). The duplicates have the exact same date and time, so the method to delete a "newer" duplicate will not work. Is there a simple way to delete exact duplicates from the itune library?

    This application can help.  It's US$15.  http://dougscripts.com/apps/dupinapp.php

  • Problem with date and time preference

    hi there,
    i set my date and time and the time support yesterday and then i click the lock button to prevent further chance and last night i shut down my iMac, open it again in the morning the lock open back up and the timezone support change.
    i redo that again and restart my iMac the same thing happen. is this a problem with my software or everyone have this problem?
    any idea what should i do?
    thanks in advance
    regards AL

    Having the same problem, & am running Parallels (which I haven't used for some time) not boot camp. I tick the box labeled "Set time automatically" & lock the "click the lock to make changes". When I reboot, the Lock is unlocked and the "set time...." is unticked. Any ideas. Cheers.

  • Problem with date and time syncing itouch to macbook

    i have a problem with the date and time on ical when i sync my itouch4 w my macbookair. whatever i entered into my calendar in itouch will appear different in my ical( with a 6 hrs advance difference) and the alarm i set on my itouch in the calendar doesnt ring at the right time as set even though it is shown the time that i wanted.
    Both my macbook n itouch are set to the same time zone and i have checked this many many times n the time is the same on both machine. but i just dont understand why is there a time difference when synced and my alarm just dont sound at the time it was supposedly set. it rings hours later n showing a different time that it was set but in the parenthesis the right time that i had set it.
    One time my computer ran out of battery n went into sleep mode and when i open it again, the time n date setting was all off. which im surprised why it had gone off. So did this create the problem i have now with the date n time sync or something else?
    please help!!!!

    Having the same problem, & am running Parallels (which I haven't used for some time) not boot camp. I tick the box labeled "Set time automatically" & lock the "click the lock to make changes". When I reboot, the Lock is unlocked and the "set time...." is unticked. Any ideas. Cheers.

  • Odd Date for Current Date and Time

    I am modifying a column in a list to get current date and time using =TODAY()+NOW() in the calculated field and get a time that is behind by 1 hour but the date is 4 months 114 years ahead (2128). How can I fix this field?

    http://sharepointsolutions.com/sharepoint-help/blog/2011/04/how-to-add-and-subtract-hours-and-minutes-from-date-and-time-fields-in-sharepoint-lists/

  • Need help in using SQL in a jsp file to compare date and time

    hi every one,
    Actually I am doing a project using JSP. I need to compare a date field in the database (MS Acess) to the current system date and time. I have to do this in a select statement.
    I have alredy defined a variable of type Date in the JSP file and I am comparing this variable to the date in the database through a select statemant.
    Here is what I am doing
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-mm-dd hh:mm:ss");
              java.util.Date today = new java.util.Date();
              String myDate=sdf.format(today);
    query = "SELECT Car_ID, Model_ID, Year, Ext_Color, Price from Cars where EDate <= "+myDate+" ;";
    EDate is the feild in the database and it's format is (5/12/2008 5:29:47 PM) it is of type Date/Time in MS Acess.
    when I execute the query it gives the following error
    SQL error:java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'EDate <= 2008-10-16 08:10:07'.
    I hope any one can help me with that error and answer my question, I've tried too many things but nothing helps
    Thanks in advance :-)

    Hi,
    When the comparision is needed to be done with the current date , we don't need to send in Java
    Date then format it and compare with MS Acess Date.
    In MS Access we have Date() function which will give you the current date.
    So you can try rewriting your query as following :
    query = "SELECT Car_ID, Model_ID, Year, Ext_Color, Price from Cars where EDate <= Date() ;"; ---------------------
    Hope this helps.
    Thanks

  • Function Modules for Data and Time

    Hi all,
              I need 2 function modules for date and time. when we pass current data(sy-datum) and current time (sy-uzeit) into function modules, shoud get date in <b>dd/mm/yyyy or dd.mm.yyyy</b> and time in<b> HH:MM:SS</b> formats.
    Thanks in advance

    Hi Ranjith,
    i think this will b usefull for you..
    SAP Bar Chart Function Modules and what they are used for
    Function module
    Used for
    BARC_GRAPHIC_PBO
    Starting bar chart at PBO time, using a graphic profile (parameter PROFILE)
    BARC_GRAPHIC_PAI
    Analyzing data returned by the graphic
    BARC_SET_TIME_AXIS
    Setting start and end of time axis
    BARC_SET_OPTIONS
    Setting options
    BARC_ADD_CHART
    Creating a chart
    BARC_SET_CHART_ATTRIB
    Setting chart attributes
    BARC_ADD_SECTION
    Creating a section on the time axis
    BARC_SET_SECTION_ATTRIB
    Setting section attributes
    BARC_ADD_RIBBON
    Adding a ribbon to the time axis
    BARC_SET_RIBBON_ATTRIB
    Setting attributes for ribbons in the chart
    BARC_ADD_GRID
    Adding a time grid
    BARC_SET_GRID_ATTRIB
    Setting grid attributes
    BARC_ADD_LAYER
    Adding a layer (graphic elements)
    BARC_SET_LAYER_ATTRIB
    Setting layer attributes
    BARC_ADD_LINE
    Adding a line
    BARC_ADD_CALENDAR
    Creating a calendar
    BARC_SET_CALENDAR_ATTRIB
    Setting attributes for a calendar
    BARC_ADD_TIME_PROFILE
    Creating time profiles
    BARC_SET_TIME_PROFILE_ATTRIB
    Setting attributes for time profile
    BARC_ADD_INTERVAL
    Adding a time interval
    BARC_SET_INTERVAL_ATTRIB
    Setting time interval attributes
    BARC_ADD_TIME_OBJECT
    Creating a time object
    BARC_CONVERT_DATE
    Creating a date string in bar chart format
    BARC_REVERT_DATE
    Converting a date string in bar chart format to date and time
    BARC_ADD_DATELINE
    Creating a date line
    BARC_SET_DATELINE_ATTRIB
    Setting dateline attributes
    BARC_GET_PROFILE_CONTENTS
    Obtaining profile contents for customizing a chart
    BARC_GET_COLUMN_WIDTH
    Selecting new column width
    BARC_SET_COLUMN_WIDTH
    Setting the column width
    BARC_GET_TEXTINDEX
    Obtaining the text index of a field
    BARC_SET_LABELS
    Positioning the chart display
    BARC_SET_COLUMN_ATTRIB
    Setting column attributes
    BARC_SET_ROW_ATTRIB
    Setting row attributes
    BARC_SET_ROW_HEIGHT
    Setting the line height
    BARC_SET_MAXCHARTS
    Setting the maximum number of charts sent
    <b>If its usefull reward points
    </b>

  • Work Status Report Date and Time Setting

    Hi all
    We are running BPC10 on servers configured with Central European Time which is currently 2 hours ahead of GMT allowing for Daylight Savings Time.
    From what i can see in BPC10 date and times are now stored in GMT (Zulu time) in the Audit activity tables so when a user updates the work status at say 11:00AM local CET time then a value of 09:00AM GMT is stored in the Audit Activity Header table.
    We have a report in excel that uses the EVLCK formula and will return the correct value of 11:00 am however if we run the Work Status Audit report on the Planning and Consolidation home page with user preferences set to Central European Time +1 then the time is displayed as 10:00am suggesting that daylight savings time is not accounted for. We need to set the time to Eastern European time +2 hours to display the correct figure.
    Can anyone explain why this happens? Has DST been overlooked?
    Rgds
    Alan

    Hi Alan,
    probably it's a bug, I think it's better you open an OSS message to SAP.
    Regards
         Roberto

  • Date and time field help

    Hey guys and gals,
    I'm working on a basic simple form that I'd like to use as a fax cover sheet and I'm brand new at this and I just can't find the answer anywhere. The only way I can get it to show the date and time is if I choose calculated - read only, then runtime property. But then it changes every time you open the document. It doesn't autofill the date and time any other way. Is there a way to make the date and time auto fill ONLY the first time you fill it out and then lock that field? Or do you just have to choose one of the other options, i.e., user entered - optional, recommended or required and then type it in? Which I don't really get either, because those just give you a blank field that you type in. I don't see the difference between those options and a text field. I thought maybe I could upload the pdf to show you, but I guess you can't do that here. Anyway using Acrobat 9 pro on Vista.

    It sounds like you're using LiveCycle Designer, not Acrobat, to create the form. If that's the case, you should post this question in the LiveCycle Designer forum: http://forums.adobe.com/community/livecycle/livecycle_modules_and_development_tools/livecy cle_designer_es

  • How to load date and time from text file to oracle table through sqlloader

    hi friends
    i need you to show me what i miss to load date and time from text file to oracle table through sqlloader
    this is my data in this path (c:\external\my_data.txt)
    7369,SMITH,17-NOV-81,09:14:04,CLERK,20
    7499,ALLEN,01-MAY-81,17:06:08,SALESMAN,30
    7521,WARD,09-JUN-81,17:06:30,SALESMAN,30
    7566,JONES,02-APR-81,09:24:10,MANAGER,20
    7654,MARTIN,28-SEP-81,17:24:10,SALESMAN,30my table in database emp2
    create table emp2 (empno number,
                      ename varchar2(20),
                      hiredate date,
                      etime date,
                      ejob varchar2(20),
                      deptno number);the control file code in this path (c:\external\ctrl.ctl)
    load data
    infile 'C:\external\my_data.txt'
    into table emp2
    fields terminated by ','
    (empno, ename, hiredate, etime, ejob, deptno)this is the error :
    C:\>sqlldr scott/tiger control=C:\external\ctrl.ctl
    SQL*Loader: Release 10.2.0.1.0 - Production on Mon May 31 09:45:10 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Commit point reached - logical record count 5
    C:\>any help i greatly appreciated
    thanks
    Edited by: user10947262 on May 31, 2010 9:47 AM

    load data
    infile 'C:\external\my_data.txt'
    into table emp2
    fields terminated by ','
    (empno, ename, hiredate, etime, ejob, deptno)Try
    load data
    infile 'C:\external\my_data.txt'
    into table emp2
    fields terminated by ','
    (empno, ename, hiredate, etime "to_date(:etime,'hh24:mi:ss')", ejob, deptno)
    this is the error :
    C:\>sqlldr scott/tiger control=C:\external\ctrl.ctl
    SQL*Loader: Release 10.2.0.1.0 - Production on Mon May 31 09:45:10 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Commit point reached - logical record count 5
    C:\>
    That's not an error, you can see errors within log and bad files.

  • APPLE TV 2 HD model and updated to latest version 6.1.1 since doing that it won't set date and time and tells me my Apple ID and password are incorrect and I know there not. What do I do?

    It connects to internet fine. I have tried restoring back to factory condition and hard wire update by connecting it to my Mac mini .
    The date and time won't set. And won't acknowledge my Apple ID and password......... I am usually tech savy but this has caused me grief .
    Do I need to downgrade my update....
    But can't get any menus until I log in my apple account...
    It can't log into my iTunes account until time and date have been set.
    When I did the hard wire restore connected to Mac mini it wouldn't go past the date and time screen as it wouldn't when I did the wifi update too.
    it just would get past that screen.
    Anyone help!!

    This is the result of a network issue.  Ensure port 123 on the router is open.

  • Schedule background Job Programatically at specified date and time

    Hi Everybody,
    how can i schedule a job  in background programatically for a spefic date and time ?
    Thanks and Regards
    srikanta

    Hi Chandrasekhar,
    my requirement is :
    in selection screen there will be two run mode :
    1) Run in Foreground
    2) Run in Background
    If user selects  ' Run in Background ' option , a block will open where user can give
    job schedule date  and
    job schedule time.
    Based on this date and time program will be scheduled in background.
    I have used like this :
    CALL FUNCTION 'JOB_OPEN'
          EXPORTING
            jobname                = v_jname
            SDLSTRTDT              = p_date
            SDLSTRTTM              = p_time
          IMPORTING
            JOBCOUNT               = v_jcnt
         EXCEPTIONS
           CANT_CREATE_JOB        = 1
           INVALID_JOB_DATA       = 2
           JOBNAME_MISSING        = 3
           OTHERS                 = 4.
    where v_jname is jobname
              v_jcnt   is jobcount
              p_date is  schedule date ( taken screen value)
             p_time is  schedule time ( taken screen value)
    but the job is sxcheduling immediately
    Give suggestion.
    Thanks in advance.
    Srikanta

Maybe you are looking for

  • Sql loader and tablespace doubt

    while i was inserting the data into a table using sqlloader and then suddenly the datafile gets full and i got sql*loader 605 error and i alloted a new datafile to the tablespace but the data didnt get inserted after that and the error was same sql*l

  • JSP Global Variable in MultiUser Environment???

    Hi, I heard that my Boss, taking about the declaration of the Global variable in Jsp will create a problem in the Multi-User Environment. Is it true?? If so ,What is the actual problem? It occupies more memory when compared to the Local variable?? Is

  • Repeating regions in tables

    I am learning about adding dynamic data and have been through a tutorial that demonstrates how to set up a table with one row, and a repeating region that repeats the row so the my records would appear like this: 1 2 3 4 5 6 But what if I have only o

  • MDM Registration in SLD

    Hello All, I need to register MDM system in my PI 7.1 SLD, so i need to know, i should be doing this by adding as Standalong system type option or can i also do it with SLDREG? I did read a note # 1018839 regarding SLDREG and as per it.."The "receivi

  • Print Layout designer problem:project code

    Dear Experts, I tried to put database field 'project code' from table 'journal voucher entry' at repetitive area of journal voucher. It doesnot show when printing out. I already entered project code at line level of journal voucher in SBO 2005A. Than