Jump to content


Most elegant way of using a date/time field

groceryCRUD mysql date field timestamp

  • Please log in to reply
1 reply to this topic

#1 voghDev

voghDev

    Member

  • Members
  • PipPip
  • 20 posts

Posted 23 July 2014 - 01:41 PM

Hi,

 

i'm using GroceryCrud with a MySQL 5 DB. Am quite happy with it. My question is which is the most elegant and comfortable way of managing a DATE/TIME field inside a table. I would like to declare it a epoch integer, storing seconds passed since 1970/1/1 00:00, although this is not mandatory.

 

Which solution did work best for you?

- Which datatype does the MySQL field have

- Which functions to use inside GroceryCRUD's controller and model to make it easy and usable

 

Thanks in advance guys :)

 

 

[EDIT] i've seen solutions like this one, but i would prefer not to modify GroceryCRUD's core, rather than leaving it as it is.



#2 Amit Shah

Amit Shah

    grocery CRUD Master

  • Advanced Member
  • PipPipPip
  • 1,192 posts
  • LocationMumbai, India

Posted 24 July 2014 - 07:40 AM

Well the better way around - if you dont want to alter the core is a callback.







Also tagged with one or more of these keywords: groceryCRUD, mysql, date, field, timestamp

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users