|
 |
aspx thread: DateTime.Format()
Message #1 by Croft Daniel 6231 DCROFT <daniel.croft@b...> on Tue, 5 Sep 2000 09:11:31 +1100
|
|
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C016BD.1774C032
Content-Type: text/plain;
charset="iso-8859-1"
Hi All,
I was wondering if anyone could supply me with some sample code of
DateTime.Format working on DateTime.Now in C#. I keep having odd problems
trying to get it to work. I'm sure it's something I'm doing but I haven't
been able to figure it out:
DateTime.Format("P", DateTime.Now);
Or something like that, I have looked in the help, but the description
doesn't make sense to me.
Regards,
Daniel Croft
NOTICE
If you are not an authorised recipient of this e-mail, please contact Blake Dawson Waldron immediately by return e-mail or by
telephone on 61-2-9258-6000.
In this case, you should not read, print, re-transmit, store or act in reliance on this e-mail or any attachments, and should
destroy all copies of them.
This e-mail and any attachments are confidential and may contain legally privileged information and/or copyright material of Blake
Dawson Waldron or third parties.
You should only re-transmit, distribute or commercialise the material if you are authorised to do so.
Where applicable, liability is limited by the NSW Solicitors' Limitation of Liability Scheme.
This notice should not be removed.
Message #2 by Fredrik Normen <fredrik.normen@e...> on Tue, 5 Sep 2000 10:58:29 +0200
|
|
Hi,
I have wrote down an expamle for you.
<%@ Import NameSpace="System.Globalization"%>
<html>
<head>
<script language="C#" runat="server">
protected void Page_Load(Object Source, EventArgs E)
{
DateTime dt = DateTime.Now;
Datum.Text
dt.Format("d",DateTimeFormatInfo.CurrentInfo).ToString();
}
</script>
<ASP:Label Id="Datum" RUNAT="Server"/>
/Fredrik Normen
-----Original Message-----
From: Croft Daniel 6231 DCROFT [mailto:daniel.croft@b...]
Sent: den 5 september 2000 00:12
To: ASP+
Subject: [aspx] DateTime.Format()
Hi All,
I was wondering if anyone could supply me with some sample code of
DateTime.Format working on DateTime.Now in C#. I keep having odd problems
trying to get it to work. I'm sure it's something I'm doing but I haven't
been able to figure it out:
DateTime.Format("P", DateTime.Now);
Or something like that, I have looked in the help, but the description
doesn't make sense to me.
Regards,
Daniel Croft
---
|
|
 |