Jump to content

Time display & input


This topic is 6120 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi, working on a simple time card system. Is there a way to make it to be able to enter 1800 into a time field and have the field format it as 18:00 automatically?

I checked the time display options and if I for example set the separator to . and enter 10.00 is returns 00:00, if I enter 10:00 it returns 10.00 - what I want to achieve is to not have to type : when entering time so it will be easier for my boss to type in the times not having to type : every time, it will be faster to.

So in summation I want to enter 1800 into time field and have it automatically formated as 18:00 or enter 513 and have it formated as 05:13 automatically if such a thing is possible.

Thank you kindly for your help with this matter.

Link to comment
Share on other sites

Formatting the display has very little to do with the method of data entry. To enable time entry with no colon, set the field to auto-enter (with replacing) a calculation:

Replace ( Right ( "0000" & TimeField ; 4 ) ; 3 ; 0 ; ":" )

Format the field to display the time in whatever format you prefer.

Link to comment
Share on other sites

Yes, Comments solution works beautifully. If you however check the data restriction to Time of the Day, it does not work but then again I do not need that function.

Thank you.

Link to comment
Share on other sites

Ok, time is difficult. I have a following calculation:

If ( Total_Week > "40:00:00" ; Total_Week - "40:00:00" ; "" )

The result that I am getting is -70:36:40 (Total_Week = 40:30)

All fields are set time and the calc results are time. I tried with result as number and I tried with 40 and 40:00 in the calculation and it is not happening.

I am trying to get overtime. If Total work hours in a week are 40 I want to deduct 40 from that total to get the overtime.

Where am I going wrong?

Link to comment
Share on other sites

Maybe too much to ask but how would I go about calculating salary?

I tried with number as a result and I tried with GetAsNumber and it did not work.

How do I tell it to multiply 40 hours with $10.00 and give me $400.00.

The results I am getting are not friendly.

Thank you.

Link to comment
Share on other sites

Almost done. Missing a critical thing that I just cannot succeed to make. Even tried writing a custom function to get what I want - the function worked and did what I told it to do but I told it to do something other then what I want as I am not able to/ do not know to put in calc terms what I want or it might be solved with a relationship/count method?

In my Weeks table when I create daily in/out for employees (created via portal in Week table which creates line items in Week line item table) I enter start of the week date. Now, when I enter 9/18/07 as a week start I want the first record in the line items table to have a date of 9/18/07, second record should have a date of 9/19/07, following record 9/20/07 and so on until I am done entering days for that week. The dates should be created automatically based on the Start of the week date.

I tried with a new self join relation and count(date) + 1 but it did not work - I defined the relationship wrong or did the calculation from wrong table or something like that.

Thank you.,

Link to comment
Share on other sites

This topic is 6120 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.