有什么方法可以将完整的日期时间(包含毫秒部分)保存在表存储中?
我正在使用 TableServiceContext 来保存我的实体。
谢谢
有什么方法可以将完整的日期时间(包含毫秒部分)保存在表存储中?
我正在使用 TableServiceContext 来保存我的实体。
谢谢
public class YourEntity : TableEntity
{
public YourEntity(string partitionName, string id)
{
this.PartitionKey = partitionName;
this.RowKey = id;
}
public YourEntity() { }
private string _date = "";
public string CustomDate
{
get
{
return _date;
}
set
{
_date = value;
}
}
}
YourEntity entity = new YourEntity("sample", "1");
entity.CustomDate = DateTime.Now.ToString("dd/MM/yyyy hh:mm:ss.ffffff");