RE: [PHP] Converting to a string
| From: | Chris W. Parker | Date: | Wed, 23 Mar 2005 20:55:37 +0000 |
| Subject: | RE: [PHP] Converting to a string | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-211410@lists.php.net to get a copy of this message | ||
PartyPosters <mailto:sales@partyposters.co.uk>
on Wednesday, March 23, 2005 12:44 PM said:
> i am using date("l dS of F Y h:i:s A") and want to put the value in
> a database as a string, How do I converting it to a string, this is
> what I have got so far:- $v_ship_date = date("l dS of F Y h:i:s A");
That's pretty much all you need. Just make sure you enclose the data
you're passing to the database in the proper quotes (either ' or ",
depending on your needs).
INSERT INTO table (v_ship_date)
VALUES ('$v_ship_date');
Chris.
p.s. For clarity, it's best to start a completely new email to start a
new thread instead of replying to an already established thread.