Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Custom Date Format

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Custom Date Format

    I'm a new user, trying out Alpha Five version 9. My focus is "desktop" databases. I do not make database applications, or make databases to use on the Internet. I'm used to using Paradox, but because it is a dead end, I'm looking for a database program that is always in development.

    I'll likely ask many questions, but I will do searches of the help files and this forum before asking them.

    First question:

    How do I define a custom date format (for use in forms, browses, reports, etc.)? I want YYYY-MMM-DD, for example, 2009-Apr-18.


    In Paradox, and the spreadsheet in OpenOffice.org (Calc), defining a custom date format is simple and straightforward. AND then you can enter dates in the new format.

    I understand that date entry in Alpha Five is severely limited, and that is one huge black mark against Alpha in my book. On my Vista computer, I have my system locale as English-United States, and have set YYYY-MMM-DD as my short date format, but Alpha only seems to allow date entry in the format DD-MM-YYYY, which I never use. Very frustrating.

    ----

    I apologize for using an alias for my username. That is generally the custom in forums, but now I see that is not the case here. I don't see any way of changing my username, or setting an option to show my real name instead of my username. I suppose I could create a new user, but I would rather focus on figuring out how to use Alpha.

    #2
    Re: Custom Date Format

    Bruce,
    You can create whatever mask you want using the date/other functions (search for Date Mask or just Mask maybe in the forums also) or use what Alpha gives you within a form/browse for formats...I count 26 different ways there--see screenshot.

    From the help file--
    http://support.alphasoftware.com/alp..._Functions.htm
    http://support.alphasoftware.com/alp...reating_a_Mask

    Mike
    __________________________________________
    It is only when we forget all our learning that we begin to know.
    It's not what you look at that matters, it's what you see.
    Henry David Thoreau
    __________________________________________



    Comment


      #3
      Re: Custom Date Format

      Originally posted by MikeC View Post
      Bruce,
      You can create whatever mask you want using the date/other functions (search for Date Mask or just Mask maybe in the forums also) or use what Alpha gives you within a form/browse for formats...I count 26 different ways there--see screenshot.

      From the help file--
      http://support.alphasoftware.com/alp..._Functions.htm
      http://support.alphasoftware.com/alp...reating_a_Mask

      [ATTACH]20782[/ATTACH]
      Creating a mask does not appear to be useful, or work, for date fields. Also, that is only for data entry.

      What I'm supposed to do with Date & Time functions, I don't know.

      I just want to display the date in the format like 2009-Apr-19 in the date field in a form.

      It's fairly simple in Paradox to set the display format for a date to be the short or long Windows format, or to create your own format. See attachment. That's all I'm asking for.

      I'm not a stranger to programming and scripts, but it seems to me that something as straightforward as this shouldn't require extra effort.

      Comment


        #4
        Re: Custom Date Format

        We have been given the ability to make custom display formats a little while ago. See this item in the whats new in V9

        As for entering a custom date format I am sure it would be possible to get there but may be more work than just entering it the way Alpha wants. You could add it to the wishlist forum.
        Tim Kiebert
        Eagle Creek Citrus
        A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.

        Comment


          #5
          Re: Custom Date Format

          Define 2 calculated fields below.....then put the one below named "datewanted" on your form....works for me when i try it, if i'm understanding what you are wanting.


          monthwanted = cmonth(date())
          datewanted = year(date())+"-"+left(calc->monthwanted,3)+"-"+day(date())

          Comment


            #6
            Re: Custom Date Format

            for some reason, the "datewanted" field above endned up different in the post...it should be as below:


            monthwanted = cmonth(date())
            datewanted = year(date())+"-"+left(calc->monthwanted,3)+"-"+day(date())

            Comment


              #7
              Re: Custom Date Format

              too late at nite.......the way you will see if before calculation is as below, sorry for the confusion.

              monthwanted = cmonth(date())
              datewanted = year(date())+"-"+left(monthwanted,3)+"-"+day(date())

              Comment


                #8
                Re: Custom Date Format

                I took a break from thinking about databases (partly because I got busy). Now I'm back, with a clearer head, but only to say goodbye.

                If such a basic thing of formats for entering and displaying dates is too complicated to do, then I fear for the other issues that I'll inevitably have. I figure, "Why bother?"

                The fact that this limitation on displaying and entering dates has existed for years, makes clear that the programmers care more about their coding, than they do about the plain desktop database user.

                It appears to me that Alpha Five is designed for those who want to make their own custom database applications, not for a plain desktop database user.

                I can continue to use Paradox for at least the lifetime of my new computer. After that, I may look around for another desktop database program, but I won't bother looking at Alpha again.

                Good-bye.

                Comment


                  #9
                  Re: Custom Date Format

                  Drop back by and let us know when you find the perfect database. Til then, fare well and safe travels. -- tom

                  Comment


                    #10
                    Re: Custom Date Format

                    duplic
                    Last edited by SMARTII; 05-04-2009, 06:52 AM.
                    First Love

                    Comment


                      #11
                      Re: Custom Date Format

                      I really don't mind having to write my own functions. For this task of date format switching that has a special design need, I'd rather.
                      1. I remember them more easily since they are my "baby".
                      2. It's not dependent on how one sets a setting outside my control, like a windows setting that anyone can change without me realizing it.
                      So,
                      In my locale, the comfortable, intuitive entry and reading of dates by a user is mm/dd/yyyy or mm/dd/yy.
                      However, the delivery of that date to a 3rd party or sorting or report, etc. has to be something else such as yyyy-Mon-dd.

                      I make functions to do this and it converts (reformats or transforms) it either "onExit" from the field or some other convenient time.

                      The function is:
                      Y_Mon_Dy(your_date)
                      Or, in my case:
                      Y_Mon_Dy(DTE), which has a meaningful name for me.

                      PHP Code:
                      FUNCTION Y_MON_DY AS (DTE AS )
                      Y_MON_DY YEAR(DTE)+"-"+LEFT(CMONTH(DTE),3)+"-"+RIGHT(DTOS(DTE),2)
                      END FUNCTION 
                      In the case of today being the date needed:
                      Y_MON_DY(date())

                      Yields: "2009-May-04"

                      For a specific date:
                      Y_MON_DY( {12/25/09} )
                      "2009-Dec-25"

                      It doesn't matter whether you input a date of mm/dd/yy or mm/dd/yyyy or m/d/yy
                      you get the desired result.
                      This is one of those external library functions that get used anywhere, anytime I want it, just like a native A5 function.

                      In summary:
                      Let the user enter a format that is quick, and comfortable and easily checked by sight.
                      Do the transforming where it is needed.
                      In my locale, making a user enter 2009-Jul-14 is somewhat cumbersome and even error prone compared to 07/14/09
                      with the slashes already put in for them by a mask, so they just type 071409

                      I might be able to think of some reason to overthrow A5, but this wouldn't be one of them.
                      Last edited by SMARTII; 05-04-2009, 07:39 AM.
                      First Love

                      Comment


                        #12
                        Re: Custom Date Format

                        Originally posted by bvandyke View Post
                        Define 2 calculated fields below.....then put the one below named "datewanted" on your form....works for me when i try it, if i'm understanding what you are wanting.


                        monthwanted = cmonth(date())
                        datewanted = year(date())+"-"+left(calc->monthwanted,3)+"-"+day(date())
                        This would give you a "single" character DAY from day 1 - day 9.
                        If he wanted a consistent 2-digit day, Change the end part of day(date()) to:
                        RIGHT(DTOS(DTE),2)
                        Last edited by SMARTII; 05-04-2009, 07:30 AM.
                        First Love

                        Comment


                          #13
                          Re: Custom Date Format

                          I have a tagNo field, which has value 000000000, and I used mask to set it as 000-000-0000, but when i go search this field, it will show no record....Please help with that. Thank you!

                          Comment


                            #14
                            Re: Custom Date Format

                            Best to post a new thread and specify please how your search is? Like 1112223333 or 111-222-3333 and where did you apply the mask? field rules? form? etc? . if field rules, did you specify to save the "-" in the field of the table?

                            Comment


                              #15
                              Re: Custom Date Format

                              I do hope Bruce checks back. Dates are store in the tables as yyymmdd. How a user wishes to display them is completely up to them.

                              The Date_format() built-in function will easily accomplish what he needs

                              Code:
                              ?date_format(date(),"yyyy-Mon-0d")
                              = "2013-Sep-24"
                              Simple and elegant.

                              Alpha will do pretty much anything you ask of it. You just have to know what to ask...

                              TOm

                              Comment

                              Working...
                              X