• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
date related problem

#1
[eluser]dhananjay[/eluser]
i have a table in database which have a column that is type of date

i m getting current date using this code but its inserting date , on local host and hostgator server both 2007-12-12

Code:
$this->load->helper('date');
'date'=> date("m.d.y"),


any one can help me to get correct current date i will be much obliged.......

#2
[eluser]InsiteFX[/eluser]
Code:
// get current date
$cur_date = date('Y-m-d');

// get current time
$cur_time = date('H:i:s');

// get current date and time
$now = date('Y-m-d H:i:s');

#3
[eluser]dhananjay[/eluser]
Thanks a lot

it worked

date('Y-m-d')


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.