Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27517

VS 2012 [RESOLVED] Convert String to date (Can not drop the time 12:00:00 AM)

$
0
0
Hi All,

I have a string of just 8 bytes of numbers representing a date.

Looks like this, 20140611.
I can unstring it and insert a "/" but I would prefer to learn to use the .NET functions.

I'm trying to format it using the Date.ParseExact command and it is producing a formatted time in the output field.

lLooks like this 2014/06/11 12:00:00 AM.
I did a search of MSDN and I found a reference to this but no solution to avoid it.

Here is my statement

Code:

HoldDate = Date.ParseExact(HoldQuery, "yyyyMMdd", Nothing)
Does anyone know the proper way I should be converting this?

-NJ

Viewing all articles
Browse latest Browse all 27517

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>