| |

VerySource

 Forgot password?
 Register
Search
View: 754|Reply: 4

Help: time format issues

[Copy link]

1

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-1-27 18:20:01
| Show all posts |Read mode
My computer time Now = 1-4, 2017, 9:54:07 AM, I have an error inserting the database (the field is a time type). I seem to have changed the time with Super Rabbit. Is there any way? Format (Now, "yyyy-mm-dd hh: mm: ss") is the same as before
Reply

Use magic Report

0

Threads

46

Posts

23.00

Credits

Newbie

Rank: 1

Credits
23.00

 China

Post time: 2020-2-21 17:45:02
| Show all posts
Just use Format (Now, "yyyy-mm-dd hh: mm: ss") to format it once. Such a program has good compatibility.
Reply

Use magic Report

1

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

 Author| Post time: 2020-2-21 23:00:01
| Show all posts
date a
a = Format (Now, "yyyy-mm-dd hh: mm: ss")
Time after execution
2017-1-4 am 09:54:07
Error inserting database
Reply

Use magic Report

0

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-2-23 17:45:02
| Show all posts
You can use a stupid method, first intercept the string, and then convert the string into a time insert in SQL
Reply

Use magic Report

1

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

 Author| Post time: 2020-2-24 17:00:01
| Show all posts
date a
a = Format (Now, "yyyy-mm-dd hh: mm: ss")
Time after execution
2017-1-4 am 09:54:07
Error inserting database
Although the problem is solved, I don't quite understand yet.
I just changed the type of a to string type. Obviously, the data field is a time type, and I insert the character type.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list