0

I need to convert a date type:

13/09/2014 19:20:32

13: day, 9: month, 2014:year, 19 hours, 20:minutes, 32:second

I used this code:

Dim data_convert As Date = Date.ParseExact(data_decripted, "dd/MM/yyyy hh/mm/ss", System.Globalization.DateTimeFormatInfo.InvariantInfo)

but tells me that the string is not recognized as a valid datetime value. How is this possible?

johsns
  • 61
  • 1
  • 2
  • 9

1 Answers1

1

Am not a vb.net developer.After searching ur requirement i have found this.

You would need to use Date.ParseExact.

 Dim edate = "dd/mm/yyyy"


Dim expenddt As Date = Date.ParseExact(edate, "dd/MM/yyyy",


        System.Globalization.DateTimeFormatInfo.InvariantInfo)

Hope this helps..

Community
  • 1
  • 1
Avinash Babu
  • 6,171
  • 3
  • 21
  • 26