/    Sign up×
Community /Pin to ProfileBookmark

How to get Two day before date

I want to get two day before date, that will be use in mysql query to get two day before data from current date.

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@kiwibritJun 01.2007 — That's a php issue, not an html one. My first thoughts would be to build something around [url=http://uk3.php.net/manual/en/function.getdate.php]getdate[/url]. But you're more likely to get a clued up response in the php section of the forum. Maybe a mod will move this post there.
Copy linkTweet thisAlerts:
@bokehJun 01.2007 — Do it at query level:[CODE]SELECT [I]something [/I]FROM [I]tbl_name[/I] WHERE DATE_SUB(CURDATE(),INTERVAL 2 DAY) = [I]date_col[/I][/CODE]
×

Success!

Help @contactrajiv08 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.28,
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,
)...