# Entering a formatted date into the database?

**URL:** https://forum.kirupa.com/t/entering-a-formatted-date-into-the-database/274038
**Category:** Uncategorized
**Created:** [October 24, 2008, 1:17am UTC](https://forum.kirupa.com/t/entering-a-formatted-date-into-the-database/274038 "2008-10-24T01:17:00Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Flash\_Man1](https://avatars.discourse-cdn.com/v4/letter/f/8797f3/32.png) [@Flash\_Man1](https://forum.kirupa.com/u/Flash_Man1)
#### Post date: [October 24, 2008, 1:17am UTC](https://forum.kirupa.com/t/entering-a-formatted-date-into-the-database/274038/1 "2008-10-24T01:17:00Z")

</div>

Hey all,

I have a database and table which has a new field such as ‘date’ in it and i have set this to varchar(255).

I have in my php the following:

```php
$date = date('l \	\h\e jS \of\ F Y');

```

then I go ahead and insert this into the database but my records now don’t get inserted and the date doesn’t show.

Is there another way I am meant to enter this into the database?

Look forward to your replies

Thanks in advance,  
😃
