Jump to content

Timesheet help


pilliy

Recommended Posts

Hey there guys, I'm having a bit of trouble doing something. What I have is a Timesheets page linked to a Unique identifier for each person. The sheet has a Week beginning list as well. I have the days listed Mon-Sun. I was wondering how I could make it so that the Week beginning could assign dates to each of the days (I.e. Week beginning = 1/1/09 so Monday = 1/1/09 and Tuesday = 2/1/09) I've looked around for sample code to help with this but I am unable to find any.

 

Thanks for the help.

Link to comment
Share on other sites

I have the days listed Mon-Sun. I was wondering how I could make it so that the Week beginning could assign dates to each of the days (I.e. Week beginning = 1/1/09 so Monday = 1/1/09 and Tuesday = 2/1/09)

 

You can use an array for that but you would have to use it in reverse order (date first) or you would only get the last week as this will be the last to overwrite Monday through Sunday thus:

 

$days = array('1/1/09' => 'Monday', '2/1/09' => 'Tuesday', ..);

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.