chuckcou Posted February 20, 2009 Posted February 20, 2009 [color:red]How do I get the month to show as 01 vs 1? Thanks for you help
mz123 Posted February 20, 2009 Posted February 20, 2009 If you want the layout to show 01/01/2009, right click on the date field in Layout mode and choose "Date Format" and choose your formatting choice. Hope that helps!
chuckcou Posted February 20, 2009 Author Posted February 20, 2009 I need to put this into a calculation text field. Thus, the final text field will look like [color:red]2009-02-19 Currently: It looks like [color:green]2009-2-19 This is the calculation I am using-- [color:brown]Year ( enderdate) & "-" & Month ( enderdate ) & "-" & Day ( enderdate )
mr_vodka Posted February 20, 2009 Posted February 20, 2009 Since you are using a text field, take a look here. http://fmforums.com/forum/showtopic.php?tid/201019/post/316668
chuckcou Posted February 20, 2009 Author Posted February 20, 2009 Ya, that worked great. I would have never thought of using SerialIncrement. Wow, that creative. [color:red]Here is a question--Mysql requires a format of yyyy-mm-dd. I would think filemaker would have function for this format? Thanks again for the great tip.
Genx Posted February 20, 2009 Posted February 20, 2009 (edited) Doesn't have a native function... if you don't want to construct per the given examples, I wrote this CF to deal with all date / time formats though: http://www.fmfunctions.com/fid/76 e.g. php.date("Y-m-d",dateFieldHere) will get you what your after. Edited February 20, 2009 by Guest
comment Posted February 20, 2009 Posted February 20, 2009 How about: Let ( ymd = 10^4 * Year ( date ) + 10^2 * Month ( date ) + Day ( date ) ; Replace ( Replace ( ymd ; 7 ; 0 ; "-" ) ; 5 ; 0 ; "-" ) ) --- Assumes dates no earlier than year 1000.
Recommended Posts
This topic is 5815 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 accountSign in
Already have an account? Sign in here.
Sign In Now