# Date won't save in mysql

**URL:** <https://www.ruby-forum.com/t/date-wont-save-in-mysql/196628>\
**Category:** Rails\
**Created:** [March 31, 2008, 4:00pm UTC](https://www.ruby-forum.com/t/date-wont-save-in-mysql/196628 "2008-03-31T16:00:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![DrRocket](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/73ab20/32.png) [@DrRocket](https://www.ruby-forum.com/u/DrRocket)\
**Post date:** [March 31, 2008, 4:00pm UTC](https://www.ruby-forum.com/t/date-wont-save-in-mysql/196628/1 "2008-03-31T16:00:53Z")

</div>

Hi everyone, hope someone can help…

I’m working on an app, one function of which is to store a list of  
gigs for a band. I’m using datebalks as my datepicker in a form in my  
app, then run the result through Chronic to convert the natural  
language date to datetime in a before\_save def in my Gig model. This  
is working perfectly on my local development machine, but when I try  
to run it from my account hosted at Dreamhost it does not. I don’t  
receive any errors, but ‘NULL’ is being saved in the Date column in my  
MYSQL table. The rest of the data saves correctly. I have tested  
Chronic from the console on Dreamhost and it works without a hitch,  
but I have tried several different methods of using it within my app,  
and it’s like nothing at all happens.

Has anyone got any suggestions? Also, am I making this task more  
difficult than it needs to be? Is there an easier way of getting a  
natural language date from datebalks to save into MYSQL without  
something like Chronic? It seems to be like it should be a pretty  
common task, but I couldn’t find any info anywhere.

Thanks in advance!
