Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForm and ListForm and ListConverting TimeConverting Time
Previous
 
Next
New Post
8/18/2008 12:11 AM
 

OK, I couldn’t stay away…

 
How do I handle Task Time? I am currently having users enter task time (time it took to do something) in decimal format, mmm.ss,  in other words, 2 hours 34 min. and 15 sec. = 154.25 min. This is very user error prone and cumbersome for an end user. I want a user to be able to enter the task time in ‘hh:mm:ss’ and then have the ability to perform calculations on the data. i.e. convert it to decimal and back.
 
For example:
 
Time: 2:34:15
Distance: 25 miles
Speed (calculated): 9.7 mph
 
I have messed around with the ‘ticks’ and ‘datetime’ but I’m missing something. Any suggestion?
 
Thanks again,
- e
 
New Post
8/19/2008 7:46 AM
 

[Distance] * [Ticks:TicksPerDay]  / [Time_UDT_ticks] /24

 
New Post
8/19/2008 6:15 PM
 

Thanks Stefan,

The problem I'm having right now is the user Input format not necessarily the calculation part.  If I use a column named 'Time' and set the value to "Time" then it requires the user to enter hh:mm:ss AND am or pm, in other word, a clock time not an elapsed time.  This is not intuitive for an end user.  I want them to be able to enter say 23:15.33 (no am/pm and no hours if not required) for 23 min, 15 sec and 33/100 of a sec.  I have tried using text fields then converting it to string then time, example: convert([Hours] + ':' + [Min] + ':' + [Sec] + ' am', 'System.String')) but I cant get it to recognize the column for "ticks" calculations.

So, how can I enter say 1:23.55 or 2:21:33.9 (no am/pm) in a text, time, what-ever field and covert it to a format I can perform "ticks" type calculations?

Any suggestion? Thanks,

-e

 
New Post
8/20/2008 4:28 AM
 

-e,

I don't have that problem here in Germany, as our time notation is based on a 24hour base. You need a custom data type "Time", however this requires some modifications in UDT3.x. (It will be simpler in UDT5)

 
New Post
8/20/2008 11:28 PM
 

OK, so I have tried another approach and I think I'm getting closer.  

User enters [Hours] [Minutes] and [Seconds] separately and then I convert it.  Works great if ALL the fields are fill in, even with a '0' (zero) BUT doesn't work if ANY of the fields are left blank (un-touched)... then I cant perform any calculations.  I tried setting the field to '0' (zero) with IsNull but no luck.  Also, setting the Default Value to 0 (zero) does nothing, it doesn't take.

Any Suggestions??

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForm and ListForm and ListConverting TimeConverting Time


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out