본문 바로가기
tips/자주쓰는 C# 스크립트

유니티 DateTime을 string으로

by 디지털 수공업자 2020. 11. 5.
반응형

 

DateTime dateValue = DateTime.Now ;

string stringValue ;

// DateTime to String
stringValue = dateValue.ToString("yyyy/MM/dd hh:mm:ss") ;

// String to DateTime
dateValue = DateTime.Parse("2020/11/4") ;

 

 

반응형

댓글