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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T00:38:24+00:00 2026-05-22T00:38:24+00:00

ive got 2 strings, date:27.03.11 and time:15:04, which id like to format as a

  • 0

ive got 2 strings, date:”27.03.11 ” and time:”15:04″, which id like to format as a PubDate elemnt for a rss file like Fri, 18 Nov 2005 19:12:30 GMT.
How can i do this in c sharp?

  • 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-05-22T00:38:25+00:00Added an answer on May 22, 2026 at 12:38 am

    Use the following steps:

    • Parse the date and time strings into one DateTime variable. Use the DateTime.ParseExact static method for this.
    • Convert the datetime to GMT using the methods of the TimeZone class (if desired—I don’t think this is mandatory according to the RSS specification).
    • Format this variable into a string using the DateTime.ToString method. The following MSDN pages will help you choose the correct format string based on your needs:

      • Standard Date and Time Format Strings
      • Custom Date and Time Format Strings

    Since RSS requires dates to be in the RFC 822 format, the following related SO question might help you with the last step:

    • How do I parse and convert DateTime’s to the RFC 822 date-time format?

    EDIT: For the first step, have a look at this example:

    var s = "27.03.11 15:04"; 
    var dtm = DateTime.ParseExact(s, @"dd.MM.yy HH\:mm", null);
    

    (The \: ensures that : is seen as a literal : rather than a culture-specific time separator.)

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

Sidebar

Related Questions

I've got a String of a date/time in ISO-8601 format, like: 2011-04-15T20:08:18Z I want
I've got this date time string: post[date] = 2007-07-18 10:03:19 I'd like to extract
I have got a string which is maybe date = 10/08/2011; English time style.
I've got a pointer to a string, (char *) as input. The date/time looks
I've got a bunch of strings like: Hello, here's a test colon:. Here's a
I've got a string representation of a time, like 11:13 AM. This was produced
I've got a class with the following properties which I'd like to display on
I've got this XML: <BillingLog> <BillingItem> <date-and-time>2003-11-04</date-and-time> <application-name>Billing Service</application-name> <severity>Warning</severity> <process-id>123</process-id> <description>Timed out on
I've got a class with a System.Version property, which looks like this: Version Build:
I've got date and time in separate fields, in yyyyMMdd and HHmmss formats respectively.

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.