Solved:Date variable help

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
FayeC
Forum Newbie
Posts: 4
Joined: Tue Apr 01, 2008 11:36 am

Solved:Date variable help

Post by FayeC »

I have an application where a date must be entered and saved to the .data file.
Then whenever the user is editing the values, it picks up the data from the .data file and populates the table.
The issue is that I haven't been able to find the correct way to display/retrieve the date.
I have:
$proceeds = number_format(abs($_POST['proceeds'][$i]), 2, ".", "");
$endDate = date("m/d/y");

The date beingused is today's date but I need the date to be a variable instead and in a specific format.
I have tried using date_format($_POST['endDate'][$i]) but it doesn't work either.
Any help is appreciated,

FayeC

P.S. The date in question was to be just a regular text variable and didn't need any formating. I used:
$endDate = $_POST['endDate'][$i];
And it now works.
Post Reply