Jump to content

Date and Time Fields


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

Recommended Posts

I should be ashamed I know about placing a question regarding these most simple of fields when you have such straightforward formatting tools!!

But this is ukdave (me) and if I cannot understand something I will put my hand up and ask - until I do understand.

Please find attached 4 small files showing (Oh No! I see I am only allowed 1)

(a) the formatting settings I used for Date and Time and

(:P the results of keying in information (not necessarily the way one should) nevertheless keying it in the way someone perhaps using the database might do. After all they are not expected to go into detail they just see the time as say 2.35 p.m and key in literally 235 or 2.35. Come to what I mean later.

My understanding of what would happen in most databases once a default layout was prepared is this. It would automatically convert the entry (providing it was reasonable of course) - to the Date or Time format settings which had been prepared for it. Otherwise if it was obviously outside of anything that a program could reasonably interpret it might give a suitable Error message asking for a Date or Time format to be entered.

Now for me that meant if in the example I have attached for Date, keying in say 25 Dec 2003 would show that date. It didn't. Instead it tried forcing me to enter in first 25/12/2003 which it then converted to 25 Dec 2003! I know I am a beginner - but I really cannot see much sense in that. Day to day users must surely expect to just enter any reasonable format and think that the program will just change to the appropriate format immediately without subsequent intervention.

On Time I had it set to the 12 hour before AM and after PM setting. Keyed in

2.35 and up came 12:00:2.35 PM. Really makes little sense to me.

So it is on this basis I decided to post because obviously I am definitely misunderstanding the whole concept and need guidance from those who know.

Hope you can explain simply for me please. I know this is BASIC but I cannot see any sense in going further into my studies until I grasp the simple essentials.

Many thanks.

David

1file attached!

FilemakerDate.JPG

Link to comment
Share on other sites

I think you are assuming that computers are smart. They are dumb but very fast. They do what they are told to do. A little about Date and Time. Date is the number of days since 1/1/0001. Time is the number of seconds since midnight. Filemaker takes this information and displays it in the manor you select for date from the dialog box you show in your enclosure. This does not change how the data must be entered. The programmers limited the way data can be entered into date and time fields because there are so many ways they could be entered.

You can setup your database to use text fields for data entry and calculation to convert them to date or time. You can also use the auto-enter by calcualation replacing existing value. This is somewhat limited.

Link to comment
Share on other sites

... ...This does not change how the data must be entered....
Thanks Ralph that's the bit I was after - we have to make it clear to users of a database the way we want the solution used. Follow all that and understand more now.

Just taking it a little further please. I suppose one idea would be to put a small text note beside the entry box suggesting ways to enter the time or date.

And for anyone following this post - I have discovered why I ended up with that 12:00 in front of my TIME entries. It was because I had entered in testing the figure 2.35 instead of 2:35. Entering the latter gave a correction situation of 2.35 AM and had it been 14:35 then I would get the 2.35 PM indicator.

Once again, thanks for explaining all that to me - I can now continue with my studies of evaluating FM Pro 7 - I only have 8 days left to do that!

David smile.gif

Link to comment
Share on other sites

  • 3 months later...

Yes, but what if you want to use the full-stop (or period) as the seperator? I formatted the field and set the seperator to be . as it's handily just there on the number pad of most keyboards. As opposed to the : which is miles away. Just seemed easier to use for people, and it doesn't work.

Is there any way round this?

Thanks

Link to comment
Share on other sites

Then you use a number (or text) field for data entry and a separate calculation to convert the formatted result to a valid time field. See here for one such calculation.

Link to comment
Share on other sites

If you're comfortable entering time in 24 hours notation, then one field (time) is enough: auto-entering Substitute ( TimeField ; "." ; ":" ) will work.

But if you try something like:

Substitute (

TimeField ;

[ "*" ; "PM" ] ;

[ "." ; ":" ]

)

field validation will kick in BEFORE the substitution. Kinda weird, and I can't find a good explanation for it.

Link to comment
Share on other sites

We're happy to enter times in 24 hours - I think! But I'm sorry, I don't quite understand what you mean. I have a time field called Start Time. I thought maybe 'auto-entering' meant go to the definition of that field and click on Opitons/Auto-Enter. But I can't figure out what to do then! Do you mean Substitute (Start Time;".";".") should go in a calculation somewhere? i tried putting it in the auto-enter, Calculated value bit but it didn't like that. So then I tried it in the Validate bit, but again, doesn't like it.

Where should I be putting it?! I tried playing with the other calculation too and didn't get anywhere.

Sorry but I think I need a bit more of a hand!

And if anyone can tell me how to make a post a favourite when you're in the middle of it that would be great. Can only do it if I create them.....! And I think I've annoyed people by posting twice cos I couldn't find my way back to this post

Thanks blush.gif

Link to comment
Share on other sites

The reason your Substitute did not work is because the second full stop should be a colon. The favourite bit is easier. Scroll down the page while reading the posts and you will find a toggle in the extra information at the bottom

Link to comment
Share on other sites

Sorry, it does in my actual file, I must have typed it wrong. What I guess I'm trying to get at is what do I do with it? Where does it go? Sorry, but what I've tried doesn't work so it would help if someone could give me a step by step guide as to where I'm supposed to put the substitution.

Thanks

Link to comment
Share on other sites

Oooo....that's made it even worse! Now I get a question mark, whereas before filemaker thought 8.30 was 8.3 seconds.... heck

Here's what I've got:

A Time In field defined as a Time field with the Auto-Enter as Substitute ( Time in; "." ; ":" ) and the existing value box Unchecked. The Time Format option is ticked as "leave as formatted".

This field is then involved in a calculation to work out how many hours I've worked in a day (Time Out - Time In).

Thanks

Link to comment
Share on other sites

  • Newbies

I was wondering if anyone knew of a FilemakerPro and Shopping Cart solution to e-Commerce?

I was told that you can not rely on FileMarker Pro for this sort of database activity. Is that true?

Elizabeth

Link to comment
Share on other sites

Hi Jt,

It is also a double post. I wrote them early this morning, about both of these things. I also requested that the delete this one.

I haven't received a notification that they have read my PM yet, maybe they will get around to it tomorrow.

Lee

cool.gif

Link to comment
Share on other sites

  • 3 years later...

late response to this post but this is exactly what I'm trying to resolve at the moment. The example you attached works beautifully for 24 hour clock. Is there a way to make it work for 12 hour am/pm clock?

I'm sick of reminding people that they must use a colon as a time separator and want to find a way to convert their instinctive use of a full stop.

Link to comment
Share on other sites

This topic is 5478 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.