[thelist] storing dates in MySQL

Wes Reed wes at thirdstrand.com
Tue Aug 10 15:11:13 CDT 2004


I would be more inclined to insert the new records from the from the 
application side triggered by some user's action.  It is not too hard to do 
the logic there.  It could be based on the last time sheet or it could 
suggest a date based on a calculation from a constant for the first time 
period and the current date.

Wes

At 11:40 AM 8/10/2004, you wrote:
>hi all! i'm currently designing a web based timesheet application for my 
>company and i've got a question on what would be the best method to 
>accomplish the following.
>
>every two weeks, i need to generate new timesheets for everyone. in the 
>database for each person's timesheet, i have a 'dateStart' field to denote 
>this. but how should i represent and generate this value?
>
>one idea i had was to have the dateStart reference another table where the 
>first row would be now() and each subsequent row would have a valid 2 week 
>interval dateStart, ensuring that everyone's timesheet had the same 
>dateStart. if this is a good idea, is there an easy way to generate these 
>2 week intervals from the now() row? i'd only want to generate the next 
>interval when needed.
>
>if not, anyone have any good ideas for this? how much to put in the 
>database and how much to put in the application side?
>
>thanks!
>
>ted
>--
>* * Please support the community that supports you.  * *
>http://evolt.org/help_support_evolt/
>
>For unsubscribe and other options, including the Tip Harvester and 
>archives of thelist go to: http://lists.evolt.org Workers of the Web, evolt !





More information about the thelist mailing list