| |

VerySource

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

Strange, how to clear the text property of editmask, but I get '0000-00-00 00:00:00' ???

[Copy link]

2

Threads

6

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-2-6 19:00:01
| Show all posts |Read mode
There is an editmask control with em_dt. At design time, the Text is an empty string. Reading the text property in the code is also an empty string.
But why use em_dt.Text = '' in the program to set it to an empty string, and I get '0000-00-00 00:00:00' after reading the text attribute, but I want to get the empty string result!

PS: The Mask of the control is set to yyyy-mm-dd hh: mm: ss, and the MaskDataType is set to datetimemask!
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-3-27 10:45:02
| Show all posts
If Mask is set to yyyy-mm-dd hh: mm: ss
Then the system will automatically add a default value for Text
Reply

Use magic Report

0

Threads

21

Posts

18.00

Credits

Newbie

Rank: 1

Credits
18.00

 China

Post time: 2020-3-29 23:00:01
| Show all posts
'' The result after formatting with yyyy-mm-dd hh: mm: ss is '0000-00-00 00:00:00'
Reply

Use magic Report

2

Threads

6

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

 Author| Post time: 2020-3-30 12:30:01
| Show all posts
Upstairs, why set the Text property to an empty string when designing, in the code:
MessageBox ('', em_dt.Text)

Does the dialog box show an empty string?
Reply

Use magic Report

2

Threads

6

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

 Author| Post time: 2020-3-31 03:30:02
| Show all posts
This inconsistent handling of PB can cause a lot of trouble!
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