Jump to content

time


derrick katungi

Recommended Posts

yeah this seems easy enough - this will just be a normal text field which you can use jquery and masked input to create the rule of [0-9]:[0-9] which is cool and if i was you for the database type i would set it as a varchar this would except numbers and characters too.. hope this helpsss :confused:

Link to comment
https://forums.phpfreaks.com/topic/245681-time/#findComment-1261893
Share on other sites

Yeah, it appears to be just normal form field processing.

 

You can use the whole mask thing, but I find it annoying when the page dictates what can be entered via javascript. I would just make it so you can accept any time format and then make it the format you want.

 

if i was you for the database type i would set it as a varchar this would except numbers and characters too.

 

I disagree with this. At first it makes it easy as the rules are not so tight as to how it is formatted... but if you need to do any kind of query past SELECT this FROM that you may have trouble.

 

When I started, I would store dates and times in a varchar field and it made it easy, until I needed to select dates and times between 2 points, or dates where it falls on a particular day..

 

Store dates and time as the proper format, it will become easier as time goes.

Link to comment
https://forums.phpfreaks.com/topic/245681-time/#findComment-1261955
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.