Create a folder with date and time

hey yall. i'm working on a program to assign files to a created directory. for the sake of organization, i want to create a folder that is the date and time it was created. (ie c:\\new\\02-Jun-2008\\file.txt) i know i'm missing something. here's the code i have so far to create the folder:
Format formatter;
Date date = new Date();
formatter = new SimpleDateFormat("dd-MMM-yy_hh:mmaaa");
String s = formatter.format(date);
String path = "C:\\new\\";
String destination = path + s;
File d = new File(destination);
d.mkdirs();
i know its trivial for any advanced user but im only a student and any advise or useful links are great. i'll keep searching in the meanwhile. thanx.

got it myself. failed to remember NO : are allowed in windows. <sigh>

Similar Messages

  • When I create a calendar, in iphoto 8, I had an information pane lower left corner with date and time of the picture. Can it possibly be that the iphoto developers forgot about that in iphoto 9? This was very helpful when placing images according to date.

    Today I updated to the latest iphoto version. The update itself went smooth and nice as one is used to from Apple. But when I wanted to finish my already started calendar, I have encountered two problems. The first is that I can't view the aperture library anymore directly from iphoto. Instead I have to open the iphtoto library in aperture but then my calendar isn't there. So now I have to copy images back and forth. No problem.
    However, the old iphoto had a small information area in the lower left corner which was very nice to place images on an exact date. This seems to be gone...?? Really? How am I supposed to sort images according to date and time when I have to back to the library view every time? That's not very convenient..Or am I missing something?
    Thanks for ANY help!
    Patrick

    The first is that I can't view the aperture library anymore directly from iphoto.
    THat is exceeding strange since iPhoto '08 could not open or share an Aperture library - that ability was first introduced in iPhoto '11 - with the latest version of iPhoto and or Aperture you can open the same library with either application - http://support.apple.com/kb/HT5043
    In the current version of iPhoto the photos are sorted by date in the film strip - I've not recently done a calendar so do not remember the specifics -
    LN

  • How to create a folder with date each day?

    I've not used Automator, just once to "create" a workflow to create a new folder with a name; but what I want is this:
    Each morning at 12:01 am, a new folder to be created with the correct date as the name of the folder.
    So for tomorrow, Sunday 23 Nov 2008 at 12:01, I'd suddenly have a folder on my Hard Drive that would have the date like 23 Nov 2008 or 11/23/2008 or 23-11-2008 or similar.
    Then at the end of a week I'd have 7 of these; - but I can manually trash them-- I want to create these on my HD since I backup via SuperDuper! each morning (automatically) at 3:35 am (incremental backup to an external La Cie HD) and I want to know if was done, so by having a folder with the date on it I can open the external HD and if I see that that folder with the recent date is there, then I'm confident the BackUp was run.
    I have been able to create a workflow to create a folder in Automator, but not sure how to:
    1. Have the folder created automatically each day at 12:01
    2. How to have the folder label be the date
    Thanks for any comments or certainly any other work-around or other way to do this or similar.
    Regards, Steve

    Open the AppleScript Editor. Copy the following into it:
    set dt to date string of (current date)
    set mth to word 2 of dt
    set dy to word 3 of dt
    set yr to word 4 of dt
    set dtt to mth & " " & dy & " " & yr
    tell application "Finder"
    make new folder at alias "Macintosh HD:Users:username:Desktop:" with properties {name:dtt}
    end tell
    Amend the path with your Hard Disk name and username. Save as an application to anywhere suitable.
    In iCal, set up an event with a daily repeat and an alarm at the time you want it: under 'Alarm' choose 'Open file': then in the next menu which will appear change from 'iCal' to 'Other' and navigate to your script. Enter the date and time.
    Your folder will be created as required: iCal does not need to be running. This script gives the folder name as, for example, 'November 22 2008', but it's easy to amend the script if you want something a bit different - for example:
    property zro : ""
    set yr to year of (current date) as string
    set dy to day of (current date)
    set mt to month of (current date)
    set dyy to dy as string
    set nmm to the number of items in dyy
    if nmm is 1 then
    set zro to 0
    end if
    if mt is January then
    set mth to "01"
    else if mt is February then
    set mth to "02"
    else if mt is March then
    set mth to "03"
    else if mt is April then
    set mth to "04"
    else if mt is May then
    set mth to "05"
    else if mt is June then
    set mth to "06"
    else if mt is July then
    set mth to "07"
    else if mt is August then
    set mth to "08"
    else if mt is September then
    set mth to "09"
    else if mt is October then
    set mth to "10"
    else if mt is November then
    set mth to "11"
    else if mt is December then
    set mth to "12"
    end if
    set dtt to mth & "-" & zro & dy & "-" & yr as string
    tell application "Finder"
    make new folder at alias "iBook HD:Users:roger:Desktop:" with properties {name:dtt}
    end tell
    This gives the folder name as, for example, 11-22-2008. (The days will have leading zeros, if you don't want these just remove the references to 'zro'.)

  • 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.

  • Create condition based on date and time

    Hi everyone,
    I'm using Discoverer Plus 10g. I want to create a condition in my worksheet using StageTime (consists of date and time) as the parameter, i.e. StageTime > StartTimeParameter and StageTime < EndTimeParameter.
    I am able to create condition based on the date, but unable to create based on the time. I need to limit the data up to the hour, e.g.
    StageTime > 11-NOV-2005 1 AM and StageTime < 11-NOV-2005 3 AM.
    But so far I am unable to create a condition for the hour element.
    I try to use this:
    TO_DATE(TO_CHAR(:Start Date Parameter,'mm-dd-yyyy')||' '||:Start Hour||':00:00','mm-dd-yyyy hh24:mi:ss')
    Start Date Parameter is selected using the date picker in Discoverer Plus
    and the Start Hour is in the format '00' to '23'
    but was prompted with the error: ORA-015858 a non numeric character was found where a numeric was expected.
    Would really appreciate anyone's help on this! :)
    Thanks,
    Angeline :)

    how about, if :Start Date Parameter is of type DATE and :Start Hour is of type varchar2(2) to simply do
    :Start Date Parameter + to_number(:Start Hour)/24
    ?

  • 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.

  • Issue with Date and Time Picker on Windows 8.1 and Office 2013

    We are having a issue with the Developer tool in Excel called the Date and Time Picker which puts a calendar field into the spreadsheet where you can select a date from the calendar popup
    If we change this date field and then save and close and reopen it reverts back to the previous date before the change was made
    If we do the same process on a Windows 7 machine with Office 2013 it saves the changes we made to the Date and Time picker field

    Hi jdono2,
    I'm using Windows 8 and Office 2013,and I can't reproduce this issue.
    Please make sure you have already upgraded to the latest version of excel, try to reregister the MSCOMCT2.OCX.
    Also you can try to use another date picker add-in to test this issue.
    http://social.msdn.microsoft.com/Forums/office/en-US/36f83f24-cd76-4f8e-aa7b-5f166666e7d3/excel-2013-popup-calendar?forum=exceldev
    Wind Zhang
    TechNet Community Support

  • CRYSTAL REPORT GRAPH WITH DATE AND TIME

    Post Author: Dino Dentone
    CA Forum: Charts and Graphs
    Dear forum,
    I am developing a Visual Studio .net 2005 Windows Form,i have a sql table with 2 field:1) DATA (date and time)2) Temperatura (numeric)I have to make a line graph with numeric data axes.I have insert two parameters' to customize the filtering, so i can have a graph of the temperature between to date and time.If i choose two date's and time (parameters) like 20/04/2008 00:00:00 trought 20/05/2008 00:00:00 i have no problemBut if a choose a range minor of 1 day (some hours like from 15/05/2008 00:00:00 trought 15/05/2008 08:00:00) i have no graph.It sound like it don't use the time values?Thank's for the Help.

    There is some debugging info on the website. I've had problems getting the text to work. It was generally that I installed either the wrong 'version' of ImageMagick (the recommended one works for me--I'm running Vista x64 and one time installed the x64 version and it didn't work). I also installed Ghostscript to get the font list to work correctly. At one time I installed the x64 version of Ghostscript and it didn't work with the plug-in, either.
    I installed two items:
    ImageMagick: ImageMagick-6.4.9-3-Q16-windows-dll.exe
    Ghostscript: gs863w32.exe
    I don't know if it is necessary but I also added the fonts from
    ghostscript-fonts-std-8.11.tar.gz to the c:\Program Files (x86)\gs\fonts directory. Some, none, perhaps all, may already be installed just by installing ghostscript--it has been so long that I don't remember exactly. I do know that the contents of the gs fonts directory contains all the files in the .gz, I just don't remember if I put them there separately or as part of the gs install :)
    You need to make sure the font size is large enough. I usually use about 2-4% of height and export a single photo to make sure I see the text correctly.
    Tim does respond to email when he can so if you can't get it to work you can always drop him a line.

  • Script to find locks in Database with Date and time.

    Hi all,
    I used to have a script which i have lost now due to a recent laptop crash. This script used to find locks in the database.. along with the date and time since when it is locking the session.
    It was quite a comprehisive one. I think i found it on this forum only, but not able to find it now. Can someone please help me find one such comprehensive script.
    Currently I am using this script.. which is also good.. but does not have the date and time stamp on it. Is there something better.?
    SET LINESIZE 165
    SET PAGESIZE 66
    COLUMN oracle_user     FORMAT a15      HEADING 'Oracle User'
    COLUMN usercode        FORMAT a12      HEADING 'SID/Serial#'
    COLUMN os_user         FORMAT a10      HEADING 'O/S User'
    COLUMN program         FORMAT a25      HEADING 'Program'
    COLUMN mode_held       FORMAT a15      HEADING 'Mode Held'
    COLUMN mode_requested  FORMAT a15      HEADING 'Mode Requested'
    COLUMN lock_type       FORMAT a15      HEADING 'Lock Type'
    COLUMN object_name     FORMAT a30      HEADING 'Object Name'
    COLUMN lock_time_min   FORMAT 999,999  HEADING 'Lock Time (min)'
    SELECT
    s.username                                 oracle_user
    +, l.sid || '/' || s.serial# usercode+
    +, s.osuser os_user+
    +, s.program program+
    +, DECODE(l.lmode,+
    +1, NULL,+
    +2, 'Row Share',+
    +3, 'Row Exclusive',+
    +4, 'Share',+
    +5, 'Share Row Exclusive',+
    +6, 'Exclusive', 'None') mode_held+
    +, DECODE(l.request,+
    +1, NULL,+
    +2, 'Row Share',+
    +3, 'Row Exclusive',+
    +4, 'Share',+
    +5, 'Share Row Exclusive',+
    +6, 'Exclusive', 'None') mode_requested+
    +, DECODE(l.type,+
    +'MR', 'Media Recovery',+
    +'RT', 'Redo Thread',+
    +'UN', 'User Name',+
    +'TX', 'Transaction',+
    +'TM', 'DML',+
    +'UL', 'PL/SQL User Lock',+
    +'DX', 'Distributed Xaction',+
    +'CF', 'Control File',+
    +'IS', 'Instance State',+
    +'FS', 'File Set',+
    +'IR', 'Instance Recovery',+
    +'ST', 'Disk Space Transaction',+
    +'TS', 'Temp Segment',+
    +'IV', 'Library Cache Invalidation',+
    +'LS', 'Log Start or Log Switch',+
    +'RW', 'Row Wait',+
    +'SQ', 'Sequence Number',+
    +'TE', 'Extend Table',+
    +'TT', 'Temp Table',+
    l.type)                                 lock_type
    +, o.owner || '.' || o.object_name+
    +|| ' - (' || o.object_type || ')' object_name+
    +, ROUND(l.ctime/60, 2) lock_time_min+
    FROM
    v$session     s
    +, v$lock l+
    +, dba_objects o+
    +, dba_tables t+
    WHERE
    l.id1            =  o.object_id
    AND s.sid            =  l.sid
    AND o.owner          =  t.owner
    AND o.object_name    =  t.table_name
    AND o.owner          <> 'SYS'
    AND l.type           =  'TM'
    ORDER BY
    +1+
    +/+

    What Brian said is true so are your sure your query was not just reporting the start time of the current transaction from v$transaction.start_time, or the start time of the session: v$session.logon_time, or perhaps the time since the last database call (v$session.last_call_et) which for an active session would be the time the current SQL statement has been running?
    HTH -- Mark D Powell --

  • Name of the file (in utl_file) with date and time

    Instead of the below:
    vHandle1 := utl_file.fopen('/home/oracle/testdir', 'test.csv', 'W');
    I want something like this:
    vHandle1 := utl_file.fopen('/home/oracle/testdir', 'test19dec200611.35.csv', 'W');
    i.e the name of the file should have the date and time too so that every time the original is not overwritten.
    Is this possible?

    OR maybe we can use this:
    utl_file.frename('/home/oracle/testdir','test.csv,'/home/oracle/testdir','test'||to_char(sysdate,'DDMONYYYYHH24:MI')||'.csv',TRUE);
    Will it work?
    Can we download this file and open it through oracle (and not any front end like ASP etc.)

  • Working with data and time

    Hi,
    I want to know how can i access server date and time and
    display it in my flex page on a label
    plz help me finding solution
    regards
    Rajeeva

    Hi,
    I want to know how can i access server date and time and
    display it in my flex page on a label
    plz help me finding solution
    regards
    Rajeeva

  • Need help with date and time calculations please

    Hello there.. Im stuck, and im hoping someone can help..
    Working on a list to manage and track PTO.  User completes PTO request form,
    Fields
    Name
    Start Date (with time)
    End Date (with time)
    Total Number of Days/hours requested: (calculation)
    Full Day: (Yes/No)
    ok business need
    user has the ability to request a certain number of hours as opposed to a full day.
    After searching around on google. I found this calculation to help me figure out how many BUSINESS days being requested.
    =IF(ISERROR(DATEDIF([Start Date],[End Date],"d")),"",(DATEDIF([Start Date],[End Date],"d"))+1-INT(DATEDIF([Start Date],[End Date],"d")/7)*2-IF((WEEKDAY([End Date])-WEEKDAY([Start Date]))<0,2,0)-IF(OR(AND(WEEKDAY([End
    Date])=7,WEEKDAY([Start Date])=7),AND(WEEKDAY([End Date])=1,WEEKDAY([Start Date])=1)),1,0)-IF(AND(WEEKDAY([Start Date])=1,(WEEKDAY([End Date])-WEEKDAY([Start Date]))>0),1,0)-IF(AND(NOT(WEEKDAY([Start Date])=7),WEEKDAY([End Date])=7),1,0))
    This works great as long as its a [Full Day]="YES", displays results in column labeled Number of days
    now if [Full Day]="No", displays results in column labeled Number of Hours
    BUT this is my issue (well part of it) it calcuate the correct number of hours.. but puts a "1" in "Number of Days" why.. dates have not changed.. I think Its something with the above calculation but I could be way off.
    the end result is I need number of days to concat with number of hours 
    i.e 1 full day 4 hours  1.4
        0 full day 5 hours  0.5
        1 full day 0 hours  1.0
    so that the total can be deducted via workflow.. from the remaining balance in a tracker. (seperate list) 
    Any angels out there??

    Posnera-
    Try changing time zones and see if the travel itinerary times change.
    Fred

  • Date and time for background job

    Hi,
    I am creating a program with out selection screen . This program runs based on date and time . so I need to create a table
    with date and time fileds.
    Program runs based on FROM DATE FROM TIME  TO DATE  TO TIME....... FROM DATE and FROM TIME  will get it from ztable and TO DATE & TO TIME values as SY-DATUM & SY-UZEIT. In the end I will update sy-datum and sy-uzeit values in the custom table to get the values ( Use it for from date from time ) for next run of the program.
    This program is mainly used for background job so how do we get the values of from date and from time for the first run of the program ? how do we update the latest date and time details by deleting old date and time details.
    Thanks ,
    Vinay.
    Edited by: Vinay parakala on Apr 22, 2010 9:18 AM

    First of all, I'll suggest to maintain TVARVC instead of doing it in custom table unless you need a complete log.
    As per my understanding, you are trying to fetch some records based on the time period(Delta loads).
    So, you will do an initial run to load the complete data then you will run it for time periods. For example,
    1st Load- 01/01/1991(earliest date possible) - today's date say 03/22/2010
    2nd load- 03/22/2010 - today's date
    so on............
    You have to move the to date values to from date values and to date value needs to be updated by the latest one for each load.
    Do you have any dependency on background job? Please let me know if my understanding is correct or specify your requirement in detail.

  • How to provide date and time stamp to the extracted file.

    I 'm downloading data from DB to Flat file using GUI_DOWLOAD. whenever it is executed it is creating with a file name.
    if i rerun the program the file is overwriting with the same name.
    now based on the requirement how many times i executed, that many times file should be individually created and should be added with date and time stamp.
    like
    if when i executed  at the very first time it should saved with filename, date and time.
    say "Address.txt 04/05/2007 07:55:10"
    When i executed it for second time it doesn't overwrite the file.
    it should create a new file.
    like "Address.txt 04/05/2007 07:59:20".
    Please guide me the way if possible code.
    Thanks in advance.

    Hi Vamsi,
                   Use FM 'F4_PROGRAM' to take file from the user .
    In this case user will enter the file name. u can append date & time to that file path.
    Refer this code.
    CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          PROGRAM_NAME  = SY-REPID
          DYNPRO_NUMBER = SYST-DYNNR
        IMPORTING
          FILE_NAME     = P_P_FILE.
    concatenate P_FILE '04/05/2007 07:59:20' into V_FILE.
    CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                        = v_file
         filetype                        = 'ASC'
          write_field_separator           = 'X'
        TABLES
          data_tab                        = i_tab
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      IF sy-subrc = 0.
        MESSAGE i002.
      ENDIF.
    Reward points if helpful.
    Regards,
    Hemant.

  • SSRS Date and time Parameter

    Hi Forumers'
    Im trying to design a report in SSRS with date and time parameters
    I would like to combined the fromdate,fromtime and stored the value to @Fromdatetime and
    same with also todate,totime into @ToDatetime. i will used this in a where clause condition.
    can you give me guys an idea. btw, i'm using Text queries not stored procedure.
    Right now I tried this query but i got an error.
    The variable name '@FromDatetime' has already been declared. Variable names must be unique within a query batch or stored procedure.
    DECLARE @fromDateTime as datetime, @toDateTime as datetime
    SET @fromdatetime = dbo.getCombinedDateTime(@fromDate,@fromTime)
    SET @todatetime = dbo.getCombinedDateTime(@toDate,@toTime)
    Select
    v.JOURNALID
    ,v.TRANSDATE
    ,v.ITEMID
    ,v.QTY
    ,v.COSTAMOUNT
    ,v.JOURNALTYPE
    ,v.BOMLINE
    From INVENTJOURNALTRANS v with (nolock)
    Where v.TRANSDATE between @FromDatetime and @ToDatetime
    and v.JOURNALTYPE=3
    and v.BOMLINE=0
    Thank you.
    jov

    Hope this will help you. Set a parameter for  @timezoneoffset= 8, including the startdate, Enddate, StartTime,  EndTime and FromDatetime and ToDatetime. Then in your dateset properties navigate to parameters then in the parameter value of @FromDatetetime
    and ToDatetime you created you will combine the @Startdate and Starttime:
    by the way,   @timezoneoffset, set this as hidden in parameter visibility, then in default values under specify values place the 8.
    Here we go:
    In your parameters you have the following data:
    StartDate:             Starttime:
    EndDate:               EndTime:
    in your dataset properies under expression of @FromDatetime and @Todatetime you have to combine the parameter you setup.
    @FromDatetime
    =Parameters!StartDate.Value &" "&Parameters!Starttime
    @Todatetime
    =Parameters!EndDate.Value &" "&Parameters!Endtime
    In your select statement you have to do like this.
    SELECT * FROM WHERE DATEADD(HOUR,convert(int,@timezoneOffset), pt.CREATEDDATETIME) BETWEEN (@fromDateTime)
    AND  (@toDateTime)

Maybe you are looking for

  • When HP Recovery isn't available... system image using Windows 8 as backup?

    Would like to start out with a big shout out to Paul T for his VERY useful thread here !    http://h30434.www3.hp.com/t5/Notebook-Operating-Systems-and-Software/Windows-8-Product-Key-for-Pavilion-G6/m-p/3882966/highlight/false#M205987 A friend's fami

  • Is it worth trying to fix my computer, or should I look into purchasing a new one?

    I currently have an aluminum Macbook from late 2008. It has a 250GB hard drive and 2 GB RAM. I'm running OSX version 10.8.2. Recently my laptop has been running really slowly; programs will often just give me the spinning beach ball when I try to ope

  • Use of ABAP Stack

    Can you please let me know what is ABAP Stack

  • Roto Multi spots in 1 comp

    Did I understand this video correctly? http://www.peachpit.com/podcasts/episode.aspx?e=eb0dc392-6e0c-4028-817d-cec647ffcc29 It stated that if I have multiple spots to be Roto'd I can work in one comp? Via the grey drag bar? ( I think I just place mu

  • Removing risks and violations in existing SAP Landscape

    There is a landscape where SAP ECC is already installed and we are planning to install AC 5.3. As the roles are already there in ECC Dev system, so we will perform the risk analysis in Dev and once free of risks, move the role to Production.  I would