Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
| Search | Today's Posts | Mark Forums Read
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old December 15th, 2003, 05:34 PM
Registered User
Join Date: Dec 2003
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default how to declare date variables

how do i declare a variable as date variable in php. in C we have the variable declarations like date, int, etc.

Old December 15th, 2003, 05:56 PM
richard.york's Avatar
Wrox Author
Points: 5,506, Level: 31
Points: 5,506, Level: 31 Points: 5,506, Level: 31 Points: 5,506, Level: 31
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: Camby, IN, USA.
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts

Date/Time functions:

To format a date (current date, or via a supplied Unix Timestamp)

An elaborate list of formatting combinations is available at the function page there and as thus I won't elaborate more on that.

To retrieve the current Unix Timestamp, or Unix timestamp for a specific date (as an integer)

So depending on how you format the time you will either be working with an integer or a string.

Make sense?
If not please provide an example of something you did in C and would like to do in PHP.

: )

Smiling Souls

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to declare variables rehana Beginning PHP 11 April 30th, 2013 04:59 AM
Passing date variables into a sql statement hood8jmark Excel VBA 1 May 1st, 2008 01:05 PM
HOW DECLARE VARIABLES IN PHP jhan316 Beginning PHP 1 July 25th, 2006 07:16 PM
Date variables... neo_jakey Classic ASP Basics 1 January 15th, 2004 02:36 PM
Can I declare variables visable from every script Makis Beginning PHP 1 January 11th, 2004 02:02 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.