Tue Jan 7 19:39:37 MST 2020 Let’s talk about today than shall we? I’d like to think it would be a nice moment in time if we could simply get along with everything that happens in this life, yet I doubt it will. It’s a shame if you think about it. A real shame. But what are you going to do with any of it? No one knows exactly. So here we sit waiting for something better to come along, hoping for something to happen and allowing us to actually see what is real and what isn’t.
Been attempting to put a datetime variable into a MySQL Database via ColdFusion. For the life of me, I couldn't figure out what I was doing wrong.
At first I tried:
#createODBCDateTime(now())#
For some reason that was only giving me the date and not the time.
Then I tried splitting up the date and time into two different fields, one for the date and the other for the time. Then I tried this code:
#createODBCDate(now())#
#createODBCTime(now())#
That gave me the date, but still not the time. Well I did some searching and then found there's a built in function in MySQL to do this. Why not.
Talk about simple:
NOW()
Well guess what, it worked just like a charm.
Comments
Post a Comment