April 27, 2006 at 1:13 pm
i need to create a new Table with 4 Filed
start_day=Date
Start_time=time
End_date=Date
End_time=time
1) what is the best filed property to store the Time Filed (dateTime,char,varchar.................)
2) after i insert into the table i need to create a view and
i need to serach in a LONG DATE FORMAT
and do this
--------------------------
start_day+' ' Start_time AS , end_day+' ' end_time AS D_End
and convert D_Start to long date formt
and convert D_End to long date format
------------------------------------
finally i need to search between D_start And D_End
in a long date format
HOW
thnks
April 27, 2006 at 1:44 pm
SQL Server does not have a separate time field.
SMALLDATETIME contains dates and times accurate to the minute
DATETIME contains dates and times accurate to 3 milliseconds.
If you want to change the display format then I would recommend that you do it in the front-end application.
Download Books on line for details of the CONVERT statement if you want to do it in the SQL layer
April 27, 2006 at 1:49 pm
Try the link below read it before you plan your DDL (data definition langauge) because there are two time intervals in ANSI SQL Day/Time and Month/Year. If your end time crosses these boundries it can get complicated. Hope this helps.
http://www.stanford.edu/~bsuter/sql-datecomputations.html
Kind regards,
Gift Peddie
Kind regards,
Gift Peddie
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply