I have table with name Dates
. Fields are:
我有名字日期的表。领域是:
Date of Joining
Previous Date of Visit
Number of Visit
Reffered Department
For Date of Joining
and Previous Date of visit
fields, I'm entering the data from drop down list. Like: Select Day, Select Month, Select Year. Then how many fields should be created? How can I design the entire table? Please help.
对于加入日期和上一个访问日期字段,我从下拉列表中输入数据。喜欢:选择日,选择月,选择年份。那么应该创建多少个字段?我该如何设计整个表格?请帮忙。
1 个解决方案
#1
Design the table with DateTime values for those fields
使用这些字段的DateTime值设计表
DateOfJoining : datetime
DateOfJoining:datetime
PreviousDateOfVisit : datetime
PreviousDateOfVisit:datetime
Then its up to your UI to combine the selections of the split drop down fields back to one datetime parameter for inserting / updating, and vice versa for displaying.
然后直到你的UI,将拆分下拉字段的选择组合回一个日期时间参数进行插入/更新,反之亦然,以便进行显示。
This makes it far easier to query against these values.
这使得查询这些值变得容易得多。
#1
Design the table with DateTime values for those fields
使用这些字段的DateTime值设计表
DateOfJoining : datetime
DateOfJoining:datetime
PreviousDateOfVisit : datetime
PreviousDateOfVisit:datetime
Then its up to your UI to combine the selections of the split drop down fields back to one datetime parameter for inserting / updating, and vice versa for displaying.
然后直到你的UI,将拆分下拉字段的选择组合回一个日期时间参数进行插入/更新,反之亦然,以便进行显示。
This makes it far easier to query against these values.
这使得查询这些值变得容易得多。