Home > front end >  Consult the eldest brother a date problem
Consult the eldest brother a date problem

Time:09-16

Mysql date field, I through the asp to update a delivery date field. No matter how I set the default, set the date type, or a datetime or type, he is the default value of 0000-00-00.

Then when I was in the asp to submit the form

Rs (" date fields ")=the date ()
Rs. Update


Complains that asp page

Microsoft Cursor Engine errors' 80040 e38 '

Not in a position to update, some values may have changes since the last time in reading,


Then I change the date field of mysql to character vcachar type, and then I date of asp is submitted () 2020-06-08,
Rs (" date fields ")=the date ()
Rs. Update
Submitted, save the date format characters are automatically become 8/6/2020.

CodePudding user response:

Why don't you save the timestamp, turn again to want what format,

CodePudding user response:

You can use the replace function transformation


Rs (" date fields ")=Replace (date (), "/", "")
Rs. The update

CodePudding user response:

The format of the database it doesn't matter, according to the time of formatting the line
  •  Tags:  
  • ASP
  • Related