Selasa, 01 April 2014

Re: [MS_AccessPros] Re: Date Format Issue in Access 2013 FrontEnd and SQL Server 2012 BackEnd

 

Tim & Bill-


I have one database table where the date and time need to be stored separately, so it was logical to use the separate date and time data types.  One drawback to using date instead of datetime is you cannot do day arithmetic with date, as in date + 1 AS NextDay.  You can do that with datetime just like you can in Access.

John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
SQL Queries for Mere Mortals 
(Paris, France)




On Apr 1, 2014, at 11:04 PM, <wrmosca@comcast.net> <wrmosca@comcast.net> wrote:

hi Tim
I don't know how many times the business rule started out "Oh, we only need the date, not the time." only to have it change down the road. With datetime, you can always format the outcome to show only the date.

I don't recommend datetime2 unless you need that kind of accuracy (chasing atoms). Besides, if Access is your front end it can't see milliseconds.
-Bill


---In MS_Access_Professionals@yahoogroups.com, <timdbui@gmail.com> wrote :

Hi Bill,
Would you please elaborate why you do not recommend the "date" function in SQL server and I should go for "datetime2(0)"?

Thanks!

Tim

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (9)
.

__,_._,___

Tidak ada komentar:

Posting Komentar