Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7870037
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T01:29:52+00:00 2026-06-03T01:29:52+00:00

Well basically I’m now working on contact form, and I need to add two

  • 0

Well basically I’m now working on contact form, and I need to add two dates types. User can specify which date they will use in a profile, and then it uses if statement to show exact date type (American or European) in form. That is easy, I can do it with if statement, but next is saving date type to database. Well basically my database table is timestamp, and saving European time is easy, but how about American time? Well basically, in my form for american time there is a hours ( 1 – 12 ), minutes ( 1 – 60) and period ( AM and PM ), well basically 3 select inputs, so any ideas, how could I convert them to 24 hour time and then save to database as European date?

Have done already everything with European date, now only American time left.

Hope you understood what I ment.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T01:29:54+00:00Added an answer on June 3, 2026 at 1:29 am

    Use DateTime its can convert between any date & time format you want

    $date = DateTime::createFromFormat("m/d/Y","03/32/2012");
    echo $date->format("d-m-Y"); // You can use any format 
    

    OR

    echo $date->format("U"); // Timestamp 
    

    If you want to use functions only

    $date = date_create_from_format("m/d/Y","03/32/2012");
    echo date_format($date, "d-m-Y");
    

    For documentation on different formats : http://www.php.net/manual/en/datetime.createfromformat.php

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Well basically I've got a vb.net script connecting to IRC, and I'm working on
well i basically cant add an app.config file to my win forms project. and
My web app runs well except one thing. File Uplods. Basically when a user
well basically can long long int hold number with 100 symbols? for example can
Well I am working on a site that basically accepts PayPal payments to give
Well, basically thats the scenario: I need to reach a MS SQL Server 2000
well right now I basically have the jquery load function like this $('#results').load(sources.php?source=1&page=<?=$_GET['page']?>&search=<?=$_GET['search']?>); so
Well, basically my struts servlet isn't working right. Please tell me if anything appears
I got this code, I would like to optimize. I basically can add new
the jQuery tablesorter plugin isn't working too well for one specific case. Basically, I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.