cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper IV
Helper IV

problem changing date format

I have a string type field that stores a date

whose value is as follows

 

 

Set(
    DateStart,
    DateTimeValue (DateStart.SelectedDate & "" & TimeStart.Selected.Value & ":" & MinStart.Selected.Value)
)

 

 

this works fine

The problem I have is that when I insert it
the format varies

sometimes it is inserted as follows

1/2/2020
 
and in other occasions this is inserted

January 1, 2020

I need it to always be stored with the numeric format (1/2/2020)

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Resident Rockstar
Resident Rockstar

Re: problem changing date format

Try this:

 

Set(DateStart,Text(DateTimeValue (DateStart.SelectedDate & " " & TimeStart.Selected.Value & ":" & MinStart.Selected.Value),DateTimeFormat.ShortDate))

 

Or replace ShortDate with ShortDateTime

---
If this answered your question, please click "Accept Solution". If this helped, please Thumbs Up.

View solution in original post

3 REPLIES 3
Highlighted
Resident Rockstar
Resident Rockstar

Re: problem changing date format

Try this:

 

Set(DateStart,Text(DateTimeValue (DateStart.SelectedDate & " " & TimeStart.Selected.Value & ":" & MinStart.Selected.Value),DateTimeFormat.ShortDate))

 

Or replace ShortDate with ShortDateTime

---
If this answered your question, please click "Accept Solution". If this helped, please Thumbs Up.

View solution in original post

Highlighted
Helper IV
Helper IV

Re: problem changing date format

I've tried it and it works as I expected, thank you very much Eric I still don't know why this varied in format

Highlighted
Resident Rockstar
Resident Rockstar

Re: problem changing date format

Yeah, that's an odd one.

Helpful resources

Announcements
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,935)