How to format date in Kohana php -


I am using Kohana 3.1 and need to convert to format on 2011-04-21 21: 45: 00. 21:45:00 is the current time when the date will be selected using the date selector function. I need to compare the date and time I tried to format the date with the help of date assistant.

  $ time = date :: formatted_time ($ actual data, 'wi-m-dh: i: s');   

But this error returns the "date of unchanged method: formatted_time ()"; I tried to do this -

  $ format = 'y-m-d'; $ Date = DateTime: createFromFormat ($ format, $ _POST ['real date']);   

and it has been given the "Time to call the undefined method" timetime :: bunfrom () "" error.

How can I do this in Kohana or use PHP functions to format the date?

Which php are you running (you can use phpinfo () to do this ) Kohana 3.1 requires a fairly recent version of php 5.2.x from memory

You can use the original php date function as an option instead

 < Code> Date ('Ymd H: i: <,           

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -