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 9218981
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:59:33+00:00 2026-06-18T02:59:33+00:00

I have a table `CREATE TABLE IF NOT EXISTS `PROGETTO`.`ALBERGO` ( `ID` INT(11) NOT

  • 0

I have a table

`CREATE  TABLE IF NOT EXISTS `PROGETTO`.`ALBERGO` (

`ID` INT(11) NOT NULL COMMENT 'identificativo dell\' albergo' ,
`nome` VARCHAR(45) NULL COMMENT 'Il nome dell\'albergo' ,
`viale` VARCHAR(45) NULL COMMENT 'Il viale in cui si trova  ' ,
`num_civico` VARCHAR(5) NULL COMMENT 'Il numero civico che gli appartiene' ,
`data_apertura` DATE NULL COMMENT 'Data di inizio apertura (inizio stagione)' ,
`data_chiusura` DATE NULL COMMENT 'Data di chiusura (fine stagione)' ,
`orario_apertura` TIME NULL COMMENT 'Orario di apertura' ,
`orario_chiusura` TIME NULL COMMENT 'Orario di chiusura' ,
`posti_liberi` INT(11) NULL COMMENT 'Disponiblità posti liberi ' ,
`costo_intero` FLOAT NULL COMMENT 'Costo del prezzo intero' ,
`costo_ridotto` FLOAT NULL COMMENT 'Costo del prezzo ridotto' ,
`stelle` INT(11) NULL COMMENT 'Classificazione in base al criterio delle stelle' ,
`telefono` VARCHAR(15) NULL COMMENT 'Recapito telefonico' ,
`mail` VARCHAR(100) NULL COMMENT 'Recapito e-mail' ,
`web` VARCHAR(100) NULL COMMENT 'Sito Web relativo all\'ente' ,
'Nome-paese` VARCHAR(45) NOT NULL COMMENT 'Identificativo del paese in cui si trova l\'albergo' ,
`Comune` CHAR(2) NOT NULL COMMENT 'Identificativo del comune in cui si trova l\'albergo' ,
PRIMARY KEY (`ID`) ,
INDEX `Nome-paese` (`Nome-paese` ASC) ,
INDEX `Comune` (`Comune` ASC) ,
CONSTRAINT `Nome-paese`
  FOREIGN KEY (`Nome-paese` )
  REFERENCES `PROGETTO`.`PAESE` (`Nome-paese` )
  ON DELETE NO ACTION
  ON UPDATE CASCADE,
CONSTRAINT `Comune`
  FOREIGN KEY (`Comune` )
  REFERENCES `PROGETTO`.`PAESE` (`Comune` )
  ON DELETE NO ACTION
  ON UPDATE CASCADE)
ENGINE = InnoDB

When i try to run this query:

INSERT INTO `PROGETTO`.`ALBERGO`(`ID`, `nome`, `viale`, `num_civico`, `data_apertura`, `data_chiusura`, `orario_apertura`, `orario_chiusura`, `posti_liberi`, `costo_intero`, `costo_ridotto`, `stelle`, `telefono`, `mail`, `web`, `Nome-paese`, `Comune`) 
VALUES(0, 'Hotel Centrale', 'Via Passo Rolle', '74', '01-05-2012', '31-09-2012', '06:30', '24:00', 80, 50, 25, 3, '43968083', 'info@hcentrale.it', 'http://www.hcentrale.it/', 'Trento', 'TN')

*Error Code: 1292. Incorrect date value: ’01-05-2012′ for column ‘data_apertura’ at row 1*

What have i to change? (i tried to change format’s date from gg/mm/yyyy to gg-mm-yyyy, but nothing changed)

  • 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-18T02:59:34+00:00Added an answer on June 18, 2026 at 2:59 am

    Insert date in the following format yyyy-MM-dd example,

    INSERT INTO `PROGETTO`.`ALBERGO`(`ID`, `nome`, `viale`, `num_civico`, `data_apertura`, `data_chiusura`, `orario_apertura`, `orario_chiusura`, `posti_liberi`, `costo_intero`, `costo_ridotto`, `stelle`, `telefono`, `mail`, `web`, `Nome-paese`, `Comune`) 
    VALUES(0, 'Hotel Centrale', 'Via Passo Rolle', '74', '2012-05-01', '2012-09-31', '06:30', '24:00', 80, 50, 25, 3, '43968083', 'info@hcentrale.it', 'http://www.hcentrale.it/', 'Trento', 'TN')
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have table: CREATE TABLE IF NOT EXISTS `TxtDila` ( `ID` int(11) NOT NULL
I have this table: CREATE TABLE IF NOT EXISTS `produtos` ( `id` int(11) NOT
I have the following table: CREATE TABLE IF NOT EXISTS `customer_list` ( `id` INT
I have a code: CREATE TABLE IF NOT EXISTS Person ( name varchar(24) ...
I have a table: CREATE TABLE siteConfig ( settingName VARCHAR(64) NOT NULL, value VARCHAR(255),
I have this table: CREATE TABLE `test` ( `ID` int(11) NOT NULL auto_increment, `text`
I have this table: CREATE TABLE `point` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `siteid`
I have a table CREATE TABLE IF NOT EXISTS `dept` ( `did` int(11) NOT
I have this Tags table CREATE TABLE IF NOT EXISTS `Tags` ( `id_tag` int(10)
I have this table: CREATE TABLE IF NOT EXISTS `events` ( `evt_id` int(11) NOT

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.