FormatDateTime() public static méthode

Gets the DateTimeFormat instance and date instance to obtain the date with the format passed
public static FormatDateTime ( System format, System date ) : string
format System The DateTimeFormat to obtain the time and date pattern
date System The date instance used to get the date
Résultat string
Exemple #1
0
 public override string Serialize(ScalarValue value_Renamed)
 {
     return(SupportClass.FormatDateTime(dateFormatter, ((DateValue)value_Renamed).value_Renamed));
 }
 public string FormatLongDateTime(DateTime date)
 {
     return(SupportClass.FormatDateTime(SupportClass.GetDateTimeFormatInstance(1, 1, CultureInfo.CurrentCulture), date));
 }
 /// <summary>
 /// Formats a date/time in 'short' style.
 /// </summary>
 /// <param name="date">A Date.</param>
 /// <returns>A String.</returns>
 public String FormatShortDateTime(DateTime date)
 {
     return(SupportClass.FormatDateTime(SupportClass.GetDateTimeFormatInstance(3, 3, CultureInfo.CurrentCulture), date));
 }
Exemple #4
0
 public override byte[] EncodeValue(ScalarValue value_Renamed)
 {
     return(ASCII.Encode(new StringValue(SupportClass.FormatDateTime(formatter, ((DateValue)value_Renamed).value_Renamed))));
 }
Exemple #5
0
 protected internal virtual System.String getCaption(System.DateTime date)
 {
     return("Jamocha - Rete Network - " + SupportClass.FormatDateTime(SupportClass.GetDateTimeFormatInstance(2, 2, System.Globalization.CultureInfo.CurrentCulture), date));
 }
Exemple #6
0
 private void  initDate()
 {
     //UPGRADE_ISSUE: Constructor 'java.text.SimpleDateFormat.SimpleDateFormat' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javatextSimpleDateFormat'"
     //UPGRADE_TODO: The equivalent in .NET for method 'java.util.Calendar.getTime' may return a different value. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1043'"
     todayString = SupportClass.FormatDateTime(new SimpleDateFormat("ddMMyy"), SupportClass.CalendarManager.manager.GetDateTime(new System.Globalization.GregorianCalendar()));
 }
Exemple #7
0
 /// <summary> Formats a date/time in 'long' style.
 /// *
 /// </summary>
 /// <param name="date">A Date.
 /// </param>
 /// <returns>A String.
 ///
 /// </returns>
 public virtual System.String formatLongDateTime(System.DateTime date)
 {
     return(SupportClass.FormatDateTime(SupportClass.GetDateTimeFormatInstance(1, 1, System.Globalization.CultureInfo.CurrentCulture), date));
 }