Welcome Guest, Not a member yet? Register   Sign In
ActiveRecord & inserting dates
#7

[eluser]internut[/eluser]
[quote author="AgentPhoenix" date="1214930561"]I'm not sure how you're wanting to store dates in your database. Personally, I like to use UNIX timestamps because it's a lot easier to format and you can do some timezone support if you want too. I'd definitely check out the Date Helper. From there, you can pass UNIX timestamps to other functions to get MySQL time or even human readable time. Then, like you have with your time() function, just put now() or something and it'll work. That's what I've been doing lately in my own application. Smile[/quote]

Interesting topic that I'm trying to figure out the best way to go about things. I usually use a datetime & timestamp field though it seems easier & more powerful to use unix timestamp..

Thoughts?


Messages In This Thread
ActiveRecord & inserting dates - by El Forum - 07-01-2008, 05:02 AM
ActiveRecord & inserting dates - by El Forum - 07-01-2008, 05:42 AM
ActiveRecord & inserting dates - by El Forum - 07-01-2008, 06:31 AM
ActiveRecord & inserting dates - by El Forum - 07-01-2008, 06:35 AM
ActiveRecord & inserting dates - by El Forum - 07-01-2008, 06:48 AM
ActiveRecord & inserting dates - by El Forum - 07-08-2008, 07:44 PM
ActiveRecord & inserting dates - by El Forum - 07-09-2008, 12:38 PM



Theme © iAndrew 2016 - Forum software by © MyBB