There is no creation date available as far as I know unless you log the file creation date in a script. But you can use the stat to get the time stamp for last access, last change and last modification time. For example:
Hi All,
I have some files which are creates every day using a script. I want to create a log files which does write "filename,creation day and time"
how can I do this ??
Alice (3 Replies)
Dear Expert,
Is there a command to do that in Unix?
In such a way that we don't need to actually "write" or
modified the content.
-- monkfan (4 Replies)
Hi All,
I need to get file creation date.
I have to access one file who's name is like...
abc.log092308
and the date changes as per current date. And i am accessing this file next day. meance in above case i will access above file on 09-24-2008
Also one problem is that this file... (2 Replies)
Hi,
Can anyone tell me a process to find the creation date of a file in a directory.
If suppose I have a file in a directory created in 2009
-rw-r--r-- 1 xyz guest 2480 Jul 16 2009 sample.txt
The command should return the the file creation date as 16/07/2009
thanks, (2 Replies)
Is it possible to find all files based on the date of creation? And if so, how? I've been looking at the find command but it seems that only modification times are used as an option. (1 Reply)
Dear Masters,
I am using solaris 10. There is a requirement if a file created on Feb 1 or Feb 2, the creation date will be changed to Jan 31. Is there any command on Solaris to do that?
Thanks,
Kris (1 Reply)
Hi
I am unable to find files, those are present anywhere in the same directory tree, based on the creation date. I need to find the files with their path, as I need to create them in another location and move them. I need some help with a script that may do the job.
Please help (2 Replies)
Hello ,
I am looking for a script to print file name and its last updated time.
FILE CREATION-TIME FILE-NAME
24/10/2017 12:34 TDR-IU-8-2017.10.24.07:40:00-2017.10.24.07:45:00
when we run l command it print the directory and the files with details like permission,... (1 Reply)
Discussion started by: sadique.manzar
1 Replies
LEARN ABOUT PHP
datetime.setisodate
DATETIME.SETISODATE(3) 1 DATETIME.SETISODATE(3)DateTime::setISODate - Sets the ISO date
Object oriented style
SYNOPSIS
public DateTime DateTime::setISODate (int $year, int $week, [int $day = 1])
DESCRIPTION
Procedural style
DateTime date_isodate_set (DateTime $object, int $year, int $week, [int $day = 1])
Set a date according to the ISO 8601 standard - using weeks and day offsets rather than specific dates.
PARAMETERS
o $object
-Procedural style only: A DateTime object returned by date_create(3). The function modifies this object.
o $year
- Year of the date.
o $week
- Week of the date.
o $day
- Offset from the first day of the week.
RETURN VALUES
Returns the DateTime object for method chaining or FALSE on failure.
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 5.3.0 | |
| | |
| | Changed the return value on success from NULL to |
| | DateTime. |
| | |
+--------+---------------------------------------------------+
EXAMPLES
Example #1
DateTime.setISODate(3) example
Object oriented style
<?php
$date = new DateTime();
$date->setISODate(2008, 2);
echo $date->format('Y-m-d') . "
";
$date->setISODate(2008, 2, 7);
echo $date->format('Y-m-d') . "
";
?>
Procedural style
<?php
$date = date_create();
date_isodate_set($date, 2008, 2);
echo date_format($date, 'Y-m-d') . "
";
date_isodate_set($date, 2008, 2, 7);
echo date_format($date, 'Y-m-d') . "
";
?>
The above examples will output:
2008-01-07
2008-01-13
Example #2
Values exceeding ranges are added to their parent values
<?php
$date = new DateTime();
$date->setISODate(2008, 2, 7);
echo $date->format('Y-m-d') . "
";
$date->setISODate(2008, 2, 8);
echo $date->format('Y-m-d') . "
";
$date->setISODate(2008, 53, 7);
echo $date->format('Y-m-d') . "
";
?>
The above example will output:
2008-01-13
2008-01-14
2009-01-04
Example #3
Finding the month a week is in
<?php
$date = new DateTime();
$date->setISODate(2008, 14);
echo $date->format('n');
?>
The above examples will output:
3
SEE ALSO DateTime.setDate(3), DateTime.setTime(3).
PHP Documentation Group DATETIME.SETISODATE(3)