2

Flexibility in date format in Date Time Picker

The date format for the Date time picker in Axiom can be changed.

For example, only needs to display the DATE without any TIME

3 replies

null
    • wise_james
    • 2 yrs ago
    • Reported - view

    I think this is a good idea (to not even give them the option to enter a time) but in case it helps, this can be used in a script to update a label (named Label1) with just the date and no time from a date time picker control (DTP1)

    Label1.Text=DTP1.DateTime.ToShortDateString();

    I'll warn though that I think it uses UTC so if you are in EDT and would pick May 3rd at 11 PM, the label will be set to May 4th. I thought I had a solution for that but didn't fully get it right off.

      • wise_james
      • 1 yr ago
      • Reported - view

      Correct syntax to account for local time zone seems to work when I use this: 

      ValueBox2.AggregateStartTime=DateTimePicker1.DateTime.ToLocalTime().ToString();

      • branko_radulovic
      • 1 yr ago
      • Reported - view

      James Wise Thanks for this tip. 

Content aside

print this pagePrint this page
  • 2 Votes
  • 1 yr agoLast active
  • 3Replies
  • 193Views
  • 3 Following