Link to home
Start Free TrialLog in
Avatar of chrisryhal
chrisryhal

asked on

Format SYSTEM.DATETIME.NOW

I have the below SQL Insert statement in my WinApp and I would like to make the formatting (mm/dd/yyyy) instead of the default mm/dd/yyy hh:mm

I am trying to do this an easy way without having to create a declaration first, because i know I can do it like so:

        Dim strdate As DateTime
        strdate = System.DateTime.Now
        Dim displayString As String
        displayString = Format(strdate, "MM/dd/yyyy")

\\\\\\\\\\\\\\\INSERT STATEMENT\\\\\\\\\\\\\


        strSQLInsert = strSQLInsert & "'" & Trim(System.DateTime.Now) & "',"
SOLUTION
Avatar of Kinger247
Kinger247

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of chrisryhal
chrisryhal

ASKER

They all worked, but I actually am using Idle_Minds.  I am going to award everyone points though.  Thanks for the help!!!!  I get confused sometimes when messing around with formats.