Question:You are developing a fiscal report for a customer. Your customer has a main office in the
United States and a satellite office in Mexico. You need to ensure that when users in the satellite office
generate the report, the current date is displayed in Mexican Spanish format. Which code segment should
you use? -(VB.NET) 

A Dim dtfi As DateTimeFormatInfo = New CultureInfo("es-MX", False).DateTimeFormat
Dim dt As New DateTime(DateTime.Today.Year, DateTime.Today.Month, DateTime.Today.Day)
Dim dateString As String = dt.ToString(dtfi.LongDatePattern) 

B Dim cal As Calender = New CultureInfo("es-MX", False).Calender
Dim dt As New DateTime(DateTime.Today.Year, DateTime.Today.Month, DateTime.Today.Day)
Dim dateString As String = dt.ToString() 

C Dim dateString As String =
DateTimeFormatInfo.CurrentInfo.GetMonthName(DateTime.Today.Month) 

D Dim dateString As String = DateTime.Today.Month.ToString("es-MX") 

+ Answer
+ Report
Total Preview: 1322

Copyright © 2024. Powered by Intellect Software Ltd