Jump to content

Recommended Posts

This post is to helps someone who asked a question on facebook. I'm posting it here so i can share the file.

Quote

Hello. Thanks for the add. I have a field in a database that is a month and year. The entities are listed as MMYYYY no separation or separator. I tried to change the format in the inspector but can’t seem to get it to work. Can someone guide me in the proper way to change this so the results are converted to month and year (Example, April, 2020) thank you in advance

 

 

Dates.fmp12.zip

Dates_v2.fmp12.zip

Link to post
Share on other sites

Rather than using GetAsDate - which converts a (locale-specific) text representation of a date into a date.

GetAsDate ( Left ( Dates::MMYYYY ; 2  ) & "/1/" & Right ( Dates::MMYYYY ; 4 ) )

it would be better to use the simpler Date constructor:

Date ( Left ( Dates::MMYYYY ; 2  ) ; 1 ; Right ( Dates::MMYYYY ; 4 ) )

...otherwise v2 seems to be doing the job fine

 

 

 

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.