Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hi,
I need to populate a text filed with todays date. As simple it is, i use date('Y m d h:m:s'). BUT THIS won't work. If i remove the spaces between the attributes, then it works fine. or i have to put a '-' between them. Well, the '-' works fine for date, like: 2005-12-28, but what can i do for the space i NEED between time and date. Currently i'm using a '.' and it looks awkward. Somehing like: 2006-12-28.02:41:32(notice the '.' between date and time). I just want to eliminate the '.' and use a space, but it's not letting me. I have never seen this problem. I know i'm doing something wrong. Can anyone throw some intel info on this?
code snippet:Code: Select all
<?php
$today = date('Y-m-d.h:m:s');
echo $today;
?>- Vamz
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]