Jump to content

datetime


linssendesign

Recommended Posts

i have 5 variables from a form:

 

$dagpost = $_POST['dagen'];

$maandpost = $_POST['maanden'];

$jaarpost = $_POST['jaren'];

$uurpost = $_POST['uren'];

$minuutpost = $_POST['minuten'];

 

i have the following in my database:

 

  dag char(2) latin1_swedish_ci  Nee               

  maand int(2)  Nee 0               

  jaar varchar(4) latin1_swedish_ci  Nee               

  datum datetime  No 0000-00-00 00:00:00               

  tijd time  No 00:00:00

 

 

how do i get these 5 numbers into the datetime format so my database can accept this variables... ?

 

many thanks!

 

Link to comment
https://forums.phpfreaks.com/topic/109140-datetime/
Share on other sites

its for a list of agenda items when an event is happend

 

example:

 

there is a presentation on: 01-08-2009 at 04:30

 

these are the variables:

 

$dagpost = $_POST['01'];

$maandpost = $_POST['08'];

$jaarpost = $_POST['2009'];

$uurpost = $_POST['04'];

$minuutpost = $_POST['30'];

 

how do i convert this to a datetime format ?

Link to comment
https://forums.phpfreaks.com/topic/109140-datetime/#findComment-559845
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.