Symbianize Forum

Most of our features and services are available only to members, so we encourage you to login or register a new account. Registration is free, fast and simple. You only need to provide a valid email. Being a member you'll gain access to all member forums and features, post a message to ask question or provide answer, and share or find resources related to mobile phones, tablets, computers, game consoles, and multimedia.

All that and more, so what are you waiting for, click the register button and join us now! Ito ang website na ginawa ng pinoy para sa pinoy!

VB 2017 and SQL 2017 ListView Convert

julz055

Novice
Advanced Member
Messages
31
Reaction score
0
Points
26
Patulong po. May way ba para maconvert ung date & time para maging string? para ma display sa listview? bali kasi ung database ko is consist of varchar,float and date & time. Bali sa date and time ako nagkakaproblema kasi nga hindi sya string. View attachment 342834 Ayan po yung code. Salamat po. Ano po idadagdag ko sa listview method ko? View attachment 342835
 

Attachments

  • list.png
    list.png
    36.3 KB · Views: 21
  • list.png
    list.png
    14.5 KB · Views: 12
Last edited:
Patulong po. May way ba para maconvert ung date & time para maging string? para ma display sa listview? bali kasi ung database ko is consist of varchar,float and date & time. Bali sa date and time ako nagkakaproblema kasi nga hindi sya string. View attachment 1255374 Ayan po yung code. Salamat po. Ano po idadagdag ko sa listview method ko? View attachment 1255377

format mo lang yung date & time.
format(datevalue, "MM/dd/yyyy") - date
format(timevalue, "hh:mm:ss tt") - time : optional yung tt kung gusto mo lagyan ng AM/PM

edit:
if hindi gumana yan.. lagyan mo ng .Tostring sa dulo..
format(datevalue, "MM/dd/yyyy").tostring
 
Last edited:
Eh pano naman po pag ka ganito error? View attachment 1255435 Nagiinsert ako ng data sa sql gamit vb.View attachment 1255436View attachment 1255437

alisin mo yung .tostring, ang purpose lang nyan ay iconvert yung value to string.
so kung isasave mo na sa database iconvert mo ulit siya pabalik sa datatype ng column mo sa database.
CDate(DatePicker.Text) & cdate(timepicker.text)

Edit:
iwasan mo din one line lang yung syntax mo. always make sure na nasa screen mo agad yung buong code. para hindi ka na magscroll pa sa dulo. imagine if 30 fields yang sinisave mo at ganyan ang formatting ng syntax mo. lagay mo sa new line. nadedetect naman ni vb yan basta ang last sa line ay &.
 
Last edited:
Back
Top Bottom