ms access - Change date format vb.net -


i need change date format following format yyyymmdd edi files below not working leaving orderdatedb in same format

dim orderdatedb datetime = orderheaderdt.rows(0).item("orderdate") orderdatedb = format(orderdatedb, "yyyymmdd") 

this column in db

enter image description here

how can convert prooper format in vb.net

use string way...

tostring("yyyymmdd")

you wanted function, here is...

 public class form1   private sub form1_load(sender object, e eventargs) handles mybase.load     'example usage...      dim orderdatedb string = convertdatetime(orderheaderdt.rows(0).item("orderdate"))     messagebox.show(orderdatedb)   end sub    public shared function convertdatetime(byval dtdatetime datetime) string     return dtdatetime.tostring("yyyymmdd")   end function  end class 

Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -