Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 5644 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted (edited)

I need to take a date field that is not always today's date (example: 8/1/2009) and change the output to yyyy-mm-dd

I'm trying to use a calc field as text since I get a "?" if I use it as date:

Let ( [y = Right ( date ; 4 ) ;m = Left ( date ; 2 ) ;d = Middle ( date ; 4 ; 2 )] ; Substitute ( y & "-" & m & "-" & d ; "/" ; "-" ))

However since the date field isn't 08/01/2009 I can't get a consistent output.

I looked at some custom functions but can't quite find what I need ...

I think I'm close but maybe I'm going about this wrong? Help is appreciated.

Edited by Guest
Posted

You also do not need the Substitute function,

Try

Let (

[y = Year ( Date ) ;

m = Right ( 0 & Month ( Date ); 2) ;

d = Right ( 0 & Day ( Date ) ; 2)] ;

y & "-" & m & "-" & d )

HTH

Lee

Posted (edited)

I'm getting a "?" with your calc.....

Edit: Spoke to soon. When I changed the calc output to text instead of date it's now ok... thanks

Edited by Guest

This topic is 5644 days old. Please don't post here. Open a new topic instead.

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.