hot to this?

  • Thread starter Thread starter Vinnie
  • Start date Start date
V

Vinnie

I have a layer at the top of a page, and i wish to show something like
this:

Today is "Day", "Month" "Year", and the exact hour is "hh" "mm" "ss"

Any idea how to do that? I working with C# - ASP 2.0

Thanks
 
I have a layer at the top of a page, and i wish to show something like
this:

Today is "Day", "Month" "Year", and the exact hour is "hh" "mm" "ss"

Any idea how to do that? I working with C# - ASP 2.0

Thanks

<%= String.Format("Today is {0:dd}, {0:MMMM} {0:yyyy}, and the exact
hour is {0:HH} {0:mm} {0:ss}", DateTime.Now)%>
 
Vinnie said:
I have a layer at the top of a page, and i wish to show something like
this:

Today is "Day", "Month" "Year", and the exact hour is "hh" "mm" "ss"

Any idea how to do that? I working with C# - ASP 2.0

Thanks


MyLayer.Text = "Today is " + DateTime.Now.ToString("dd, MMM, yyyy") + " and
the exact hours is " + DateTime.Now.ToString("HH mm ss");
 
Vinnie said:
I have a layer at the top of a page, and i wish to show something like
this:

Today is "Day", "Month" "Year", and the exact hour is "hh" "mm" "ss"

Any idea how to do that? I working with C# - ASP 2.0

Thanks

If you want it to update continously, you need a Javascript solution. A
web search should reveal hundreds of them.
 
MyLayer.Text = "Today is " + DateTime.Now.ToString("dd, MMM, yyyy") + " and
the exact hours is " + DateTime.Now.ToString("HH mm ss");

So, in case i need to change the name of the weekdays and months from
english into another language, i should i do that?
 
If you want it to update continously, you need a Javascript solution. A
web search should reveal hundreds of them.

What exactly i should search for? (i'm just at the beginning).

Thanks
Vinnie
 
It's easy too:

System.Globalization.CultureInfo culture = new
System.Globalization.CultureInfo("pl-PL");

lblDate.Text = String.Format(
culture.DateTimeFormat,
"Today is {0:dd}, {0:MMMM} {0:yyyy}, and the exact hour is {0:HH} {0:mm}
{0:ss}",
DateTime.Now);

Regards
 
Vinnie said:
What exactly i should search for? (i'm just at the beginning).

Thanks
Vinnie

You can search for "javascript clock" for example.
 
Back
Top