1
vote
1answer
1k views

Understanding datetime formats in SQL Server

I've dealt with MS SQL Server datetime types for a long time but never thought why the following is happening: I query a table that contains a smalldatetime column. This smalldatetime is always ...
2
votes
1answer
66 views

DATETIME2FROMPARTS alternatives for SQL Server 2008

I am trying to part a datetime value and build it together removing minutes, seconds and so on. I want the values to be hourly. Usually this works on a SQL Server 2012 machine: DATETIME2FROMPARTS( ...
0
votes
1answer
143 views

Date of birth saving to MYSQL DB with timestamp or date column type [closed]

i am using MYSQL database and would like to know which of this is a good practice. way 1 - use column type in DB as timestamp. i.e will contain values like 2012-11-13 00:00:00 way 2 - use column as ...
0
votes
1answer
5k views

How to get only month from MySQL date/time?

In my MySQL server, I have rows that have the date of my created content. Example: 2013-03-17 02:53:47 For now, I am using: $date = $fetch[thedaterownamegoeshere]; <?php echo $date; ?> But ...