I dont know how to get the current date in visual basic 2008. Here is a sample code
regDate = Format(Date.Now(), "ddMMMyyyy")
The output is like 7/02/1900
Need help
User can use this
Dim todaysdate As String = String.Format("{0:dd/MM/yyyy}", DateTime.Now)
this will format the date as required whereas user can change the string type dd/MM/yyyy or MM/dd/yyyy or yyyy/MM/dd or even can have this format to get the time from date
yyyy/MM/dd HH:mm:ss
Try this:
Dim regDate as Date = Date.Now()
Dim strDate as String = regDate.ToString("ddMMMyyyy")
strDate will look like so: 07Feb2012
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With