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 8846609
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T12:02:03+00:00 2026-06-14T12:02:03+00:00

Can anyone advise on the best way to format the following date string format…

  • 0

Can anyone advise on the best way to format the following date string format…

Sat, Sep 22

to something that I can store in SQL Server as a date/time…

using format such as YYYY/MM/DD

I could do this in code, but I am reading hundreds of xml extracts not sure how best to approach this.

  • 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-14T12:02:04+00:00Added an answer on June 14, 2026 at 12:02 pm

    You could use DateTime.Parse() See here for info. Although, you’ll have to have a year in there somewhere.

    DateTime convertedDate = DateTime.Parse("Sat, Sep 22 2012");
    

    EDIT:

    Since we’re not sure if you know what year you are dealing with, I suggest that you might use something like this:

    Int32 thisYear = DateTime.Now.Year;
    string aDate = "Sat, Sep 22";
    DateTime outDate;
    while (!DateTime.TryParse(aDate + " " + thisYear.ToString(), out outDate))        
        thisYear--;
    

    This will get the DateTime for the most recent year that fits the description. If you try to use an aDate of “Fri, Sep 22”, then your result will be “9/22/2006”.

    Or, if you just want to use ‘this year’ you could just use this:

    String[] myDate = ("Fri, Sep 22").Split(',');
    DateTime convertedDate = DateTime.Parse(myDate[1].ToString());
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can anyone advise on a simple way of converting a csv string to an
Can anyone advise what the best way to check (using .NET 3.5) if a
Can anyone advise what is the best way of client and server side validation.
Can anyone advise on the best way to go about implementing copy protection for
Can anyone please advise where i'm going wrong with the following? I want the
Would anyone please advise how in jade for nodejs I can truncate a string
Can anyone advice my which is best way to write and read data in
Can anyone tell me whats the best and efficient way to communicate to a
Can anyone advise on the appropriate SAS informat to read in a datetime (dd/mm/yyyy
Can anyone please advise me if there will be any problems changing the wordpress

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.