473,320 Members | 1,694 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

how to store time picker value to database

hi.. i'm php beginner,implementing payroll system based on salary per hour.. i want to store the time value on database.the time value get from time picker.
and database has wrkingtime as time datatype..
here the problem is...

Time picker gives(hh:mm + meridian)
database -store data format is (hh:mm:ss)

when i enter 4:30PM ----> it stored on database is 00:00:04
plz anyone help me
Apr 13 '15 #1
1 2412
Dormilich
8,658 Expert Mod 8TB
you have to convert you input format to the database format.

ex.
Expand|Select|Wrap|Line Numbers
  1. $ex = new DateTime('4:30PM');
  2. echo $ex->format('H:i:s'); // 16:30:00
  3.  
ideally you can configure your time picker to return the database format.
Apr 14 '15 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: john | last post by:
Can someone give me a url of a time picker? I found a lot of date/time picker but no timepicker alone. I just want a time picker. Thanks.
5
by: Adrian Parker | last post by:
Hi. I have a date time picker in my program which uses ADO to read from an Access database. It works perfectly, unless the database is empty (no records) when opened. When you try to open an...
3
by: TD | last post by:
This code doesn't work. Every posting I can find suggests that it should. If TypeOf controlname Is DTPicker then do something here End If I am using the Date Time Picker control and wish to...
7
by: XmlAdoNewbie | last post by:
Hi All, I am wondering if it is possible to allow nulls or empty strings when it comes to the datetimepicker control. I have an app with a few datetimepickers on it and there are some instances...
5
by: Johnaton | last post by:
hi, I have this problem with the date time picker, when I bind the control to data table and add new record, it is ok, however, if I delete all records via a button using the...
4
by: Michel Posseth [MCP] | last post by:
I have a problem with the date time picker validate event wich i believe is a bug How to reproduce : throw on a form a date time picker control and a textbox control select the validating...
26
by: Killer42 | last post by:
Hi all. I have a couple of dtpicker controls on a form. When one is changed by the user (that's me, in this case) the code in the _Change event sets the other one, to keep it within a logical...
0
by: fredloh | last post by:
i have a tab control on my form. i then have several microsoft date and time picker control on the tab control. when i select a date on any of the date and time picker control, the result of the...
4
by: gggram2000 | last post by:
Hi, I'm using php 5.2.3 with mysql server 5.1 as backend. I have a program in which a person enters or chooses two dates from two datetime pickers and other info, I'm not sure if the problem is...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.