Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7931203
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T20:38:56+00:00 2026-06-03T20:38:56+00:00

I have asked this question before and used the soln but for some reason

  • 0

I have asked this question before and used the soln but for some reason it just does not work this time around. Hopefully someone else can see the error/missing element. Iparse a date that is in string format and would like to convert it to a datetime format but cannot figure out how to do this. The date appears as such:

Tue May 08 20:38:42 +08:00 2012

here is my conversion code:

Dim postDate As DateTime = DateTime.ParseExact(contentDate, "ddd MMMM dd hh:mm:ss zzz yyyy", System.Globalization.CultureInfo.InvariantCulture)
contentDate = postDate.ToString("yyyy-MM-dd hh:mm:ss")

The error is on the first line : “String was not recognized as a valid DateTime “

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T20:38:57+00:00Added an answer on June 3, 2026 at 8:38 pm

    Unfortunately, I believe the issue is that the date you have as your sample was not a Thursday, but a Sunday. In addition, I think you need to use capital letters for the Hour since it looks like you are getting military time.

    Dim postDate As DateTime = DateTime.ParseExact(contentDate, "ddd MMMM dd HH:mm:ss zzz yyyy", System.Globalization.CultureInfo.InvariantCulture)
    

    Once I made these changes, it worked.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have asked this before but I didn't get the question right so the
This question may have been asked before, but I had trouble finding an answer,
No doubt elements of this question have been asked before, but I'm having trouble
I know variants of this question have been asked before (even by me), but
Various incarnations of this question have been asked here before, but I thought I'd
I have asked aqbout timezones and date/time before but this is a more specific
I thought this question would have been asked before, but I couldn't find it
This question was asked before but the solution is not applicable in my case.
i have asked this question before but no answer was there. so asking again.
This question I have asked before and just got answer that there is an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.