If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Inputformat of fields
Hi group,
i have got a stupid problem: In my database there are fields storing time-information in seconds. The form should display the time as hours (simple calculate by 3600). This is not a problem at all;-) But the problems start because the user should be able to modify the field (also entering hours) - the value should be stored in seconds again! I worked one afternoon on this issue and could not find a solution. Please - could anyone help me and preseve me from damaging my monitor? Thanks, Dietmar |
#2
|
|||
|
|||
Here is some basic info that might help. How you use it and where you put it
will depend on the design of the form: dtmTotTime = TimeSerial(0,0,lngSeconds) Now lngTotTime will appear as a time, for example, if lngSeconds was 3600, then dtmTotTime would show as 1:00:00 AM. Never fear, we can convert it to hours: lngHours = DatePart("h",dtmTotTime) lngHours is now 1, so if you want it back to seconds: lngSeconds = DatePart("h",dtmTotTime) * 3600 "Dietmar" wrote: Hi group, i have got a stupid problem: In my database there are fields storing time-information in seconds. The form should display the time as hours (simple calculate by 3600). This is not a problem at all;-) But the problems start because the user should be able to modify the field (also entering hours) - the value should be stored in seconds again! I worked one afternoon on this issue and could not find a solution. Please - could anyone help me and preseve me from damaging my monitor? Thanks, Dietmar |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
improving performance by indexing query criteria fields | Paul James | General Discussion | 20 | February 16th, 2005 07:55 PM |
improving performance by indexing query criteria fields | Paul James | Running & Setting Up Queries | 20 | February 16th, 2005 07:55 PM |
adding 2 fields including null entries | Jesse | Running & Setting Up Queries | 26 | January 18th, 2005 05:31 PM |
Can't Add Fields to Form | Jeff Miller | Using Forms | 4 | January 12th, 2005 03:42 AM |
Automatic filling of fields in table two from table one | Jim Kelly | Database Design | 1 | September 27th, 2004 10:16 PM |