コミュニティ

I want to get System date in one of the field 回答済み

Hi,

I need to get only the System Date in one of field, How can i do that??

Present i am using the below script, here i am getting date along with time also but i don't need time. Help me..

 

using System;

using System.Globalization;

 

string deliveryDate = DateTime.Now.ToString();

Context.Field("System Date").Text=deliveryDate;

この記事は役に立ちましたか?

0人中0人がこの記事が役に立ったと言っています

コメント

3件のコメント

  • Avatar
    Vladimir Dimitrijević

    Hi,

    Actually too easy:

     

    using System;

    string deliveryDate = DateTime.Now.ToShortDateString();

    Context.Field("System Date").Text= deliveryDate;

     

    Best regards,

    Vladimir

    1
  • Avatar
    Permanently deleted user

    Thank you so much Vladimir.....Could you look the below link once please....??

    get the string in one line

    0
  • Avatar
    Permanently deleted user

    Vladimir - 

    How would you go about removing the forward slashes in the date?

    0

サインインしてコメントを残してください。