473,387 Members | 1,541 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Filename with System Date

Hi,

I'm creating a PHP application. In this I am creating files in which the data will be stored date wise.
I wanted to create this filename with the system date. The system date is stored in a variable $Date.

fopen("/C/files/acceptedinfo.csv", "a+")

I tried

fopen("/C/files/acceptedinfo".$Date.".csv", "a+") and also
fopen("/C/files/acceptedinfo\"".$Date."\".csv", "a+")

Pls. help me on this..

Thanks in advance..

Srikanth
Jun 11 '07 #1
2 2440
Purple
404 Expert 256MB
Hi and welcome to TSDN..

can you post the line of code where $Date is defined and the error you are getting when you are running the code..

Purple
Jun 11 '07 #2
epots9
1,351 Expert 1GB
how did u delcare $Date?

here is one way:
[PHP]
$Date = date("Y-m-d");
// Y = A full numeric representation of a year, 4 digits
// m = Numeric representation of a month, with leading zeros
// d = Day of the month, 2 digits with leading zeros
[/PHP]
Jun 11 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: The Spoon | last post by:
I am looking for functions that can be used to automatically update the system date and time on an NT based system, resulting from manually entered date and time values input by an operator via a...
11
by: Mike9900 | last post by:
How can I get the real system date/time if the user fakes the date, for example by setting the system date back. -- Mike
3
by: Tull Clancey | last post by:
Hi all. I'm having real trouble finding a simple solution for getting the system date and time settings. All I want to retrieve is the system short date format, is it dd/mm/yyyy or mm/dd/yyyy...
1
by: shyam vashista | last post by:
i have problem in validation check for system date with server date problem::: If i change my system date as september 30, 2006 and use validation for filling form as current date as oct30,...
4
by: anagai | last post by:
I just want to check if a date entered in a textbox is equal to the current system date. I set the date object from the input field like this: dt1=new Date('10/01/2007'); the current system...
1
by: nbharatha | last post by:
Scenario: 1.System date is changed to year 2008, per say Nov 2008 2. An offline backup of DB2 is taken 3. System date is made current ( year 2007 ) 4. DB2 database is dropped. Question : Can...
2
by: Louverril | last post by:
I have a problem I just can't get any sort of query findfirst or the sql below to correctly compare a value in a table with a supplied value. I created a very simple situation to try and figure ...
11
by: ksrashmi | last post by:
Hi , I want to change the system date using java/jsp . i am using linux system . public class LinuxJava { public static void main(String args) { try { String command = "date...
2
by: samvb | last post by:
Hi, I have just finished a program that uses ms access and depends on system date to do certain things. just when i was testing it, a friend suggested that i change system date to see how it reacts....
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.