-1

I have a asp.net application and I am running remotely an.exe file which locates in windows 2008r2 server. This exe file creates a folder according to date-time format.
When I host this web application into server, the folders cannot be created because IIS date format is like xx/xx/xx. Because it includes / , folder cannot be created.
I want to change date format like xx-xx-xx. How can I manage this?

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication2.WebForm1" Culture = "tr-TR"%> 

this did not work.

4

1 回答 1

0

您可以使用ToString()格式化您的日期时间。要获得您想要的格式,您可以使用:

myDate.ToString("yy-MM-dd")
于 2013-04-19T16:19:18.543 回答