Just a quick snippet for beginners
Simple Code for Getting Current Date and Time
Public Shared Function getCurrentDateTimeString() As String ' Returns current date and time in this format: "yyyyMMddHHmmssff" Dim rightNow As DateTime = DateTime.Now Dim strCurrentDateTimeString As String strCurrentDateTimeString = rightNow.ToString("yyyyMMddHHmmssff") Return (strCurrentDateTimeString) End FunctionPublic Shared Function getCurrentDateTimeString() As String ' Returns current date and time in this format: "yyyyMMddHHmmssff"
Dim rightNow As DateTime = DateTime.Now
Dim strCurrentDateTimeString As String
strCurrentDateTimeString = rightNow.ToString("yyyyMMddHHmmssff")
Return (strCurrentDateTimeString)
End Function
kvprajapati 1,826 Posting Genius Team Colleague
Momerath 1,327 Nearly a Senior Poster Featured Poster
JJCollins 0 Junior Poster in Training
bossie09 0 Light Poster
JJCollins 0 Junior Poster in Training
Wel Da gr8 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.