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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T23:02:00+00:00 2026-06-01T23:02:00+00:00

How can I format a DateTime binding to look exactly (or as similar as

  • 0

How can I format a DateTime binding to look exactly (or as similar as possible) like the Messaging Hub.

The following block is the code I’d ideally use to display it, or will I just need to give up and use a converter?

<TextBlock TextAlignment="Right">
    <TextBlock.Text>
        <Binding Path="Time"
                 StringFormat="*String format here?*"/>
    </TextBlock.Text>
</TextBlock>

The result I’m aiming for is as follows:

  • 12:17 (Time only) if today
  • Wed, 18:10 (Day + Time) if within 7 days
  • 01/04, 15:58 if older than 7 days
  • 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-01T23:02:02+00:00Added an answer on June 1, 2026 at 11:02 pm

    You may need to implement a Date to String converter which will produce the specific text you are looking for, as the amount of logic you will require is out of the scope of the StringFormat property.

    For more details, in particular the ThreadDateTimeConverter :-

    http://www.windowsphonegeek.com/articles/Windows-Phone-Toolkit-DateTime-Converters

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

Sidebar

Related Questions

Is there any way I can get datetime format like ' YYYY-MM-DD HH:MM:SS '
I can't get my custom DateTime string format to work in my binding. I
Possible Duplicate: How can I format a nullable DateTime with ToString()? got issue parsing
I want to format a datetime field but i can't figure out the syntactic.
I have a date as follows. $discount_start_date='03/27/2012 18:47'; $start_date=new DateTime($discount_start_date); $start_date->format('Y/m/d H:i:s'); How can
How can I format the following line to eliminate StyleCop warnings: this.BeginInvoke(this.updateHandler,new object[]{this.tmpbuf}); Now,
Need to convert a string to normal datetime format so it can be correctly
Does anyone know how can I format a select statement datetime value to only
How can I save a Properties.Settings.Default.Array using DateTime format (with just the time)?
I'm trying to format a DateTime in a C# function, but I can't get

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.