Home > Net > In c # a datetime value transformation
In c # a datetime value transformation
Time:09-27
I respectively from the datetime year and month String year=datetime. Value. The tostring (); String the month=datetime. Value. The tostring (); String strtime=year + month; At this point I want to have strtime converted to type int to want how to do? Tried several methods are an error, I may be using the wrong method consult predecessors taught specific how to operate it
CodePudding user response:
This code can you run? A datetime value attribute? Your code is written like that? https://blog.csdn.net/farmwang/article/details/50664378 Give you share a o (date) (month) (year) link The code also give you
string year=DateTime. Now. Year. The ToString (); String the month=DateTime. Now. The month. The ToString (); String strtime=year + month; Int time=int. Parse (strtime);
CodePudding user response:
DateTime DateTime=DateTime. Now; Int time=datetime. Year + datetime. The Month;
CodePudding user response:
CodePudding user response:
Do you want to do, is this? Want to get what
CodePudding user response:
Strong direct turn not
CodePudding user response:
The question is "what the heck are you doing "Too talented, I could understand every word, is together, completely don't understand what are you doing