using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("请输入日期,\n格式为‘2008-01-02’:");
string str = "";//定义变量
str = Console.ReadLine(); //接收用户输入的信息
string[] num = str.Split('-'); //分割字符串
//输出信息
Console.WriteLine("\n格式化字符串输出结果为:\n" + num[0] + "年" + num[1] + "月" + num[2] + "日");
Console.ReadKey();
}
}