/    Sign up×
Community /Pin to ProfileBookmark

Controling Date format in phpForm

Hi everyone,

I’ve just created a small form using source Forge’s phpForm creator. The form also collects the date from the server the info in the form was submitted in the form of a date stamp. However, the date format is screwy!

In the php file that processes the form’s input there is a line

$d = date(“l jS of F Y h:i:s A”);

which results in a date format of

Monday 23rd 2015f March 2015 02:56:21 PM

How to I change the php line so all I get is the date in dd-mm-yyyy format with no time?

Thanks in advance

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@rootMar 23.2015 — $d = date("d-m-Y")
Copy linkTweet thisAlerts:
@simuMar 25.2015 — date_format(%d%m%y)
×

Success!

Help @eyetrance spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...