Home > Net >  [inquired in the vb.net database date conversion issues]
[inquired in the vb.net database date conversion issues]

Time:09-19

Extracted data is "20180115"
Excuse me, how do I edit the SQL server database terms need to output is 15 in Jan 2018 (that is, digital date English month)
Dim SQL="select B.T G003 the from... "

Thank you for the great god

CodePudding user response:

The actual type and display type don't confused, or subsequent bugs more and more,

Your demand should be database type set the field type to date, the query out after obtaining value at the time of show toString processing

CodePudding user response:

20180115 is this format can't directly to date, use the select get datatable, traverse processing to the date

CodePudding user response:

String processing into a first date format, such as join -, become 2008-1-15, and then in other types of converted to date format,

CodePudding user response:

Read first, reoccupy toString transformation time,
System. A DateTime. Now. ToString (" dd MMMM yyyy ")
Can be converted into what you need,

CodePudding user response:

Loved the
reference 4 floor response:
read out first and then use the toString transformation time,
System. A DateTime. Now. ToString (" dd MMMM yyyy ")
Can be converted into a look, you need

CodePudding user response:

Take out after formatting in vb
  • Related