Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 10 total
Thread ShortDateFormat
Tue, Mar 29 2016 6:12 AMPermanent Link

Matthew Jones

Is it possible to have the ShortDateFormat to not include the year at
all? I want to set it to
       FormatSettings.ShortDateFormat := 'dd/MM';

But that gets an error. I have to include the extra /yy to not get an
invalid date component error.

Also is there a way to specify a "local" FormatSettings to these
functions? I have of course code that needs it one way, and code that
needs it another. In Delphi I use FormatDateTime which takes the format
string and just fills in the relevant fields as it goes, so
FormatDateTime('hh:nn:ss dd/mm', Now) and
FormatDateTime('yyyy-mm-dd-hh-nn-ss', Now) happily coexist without
breaking each other. (Note the nn for minutes, which is a standard it
seems).

--

Matthew Jones

2.04 b1
Tue, Mar 29 2016 6:17 AMPermanent Link

Matthew Jones

Also, how can I get the day of the week from a Date? The FormatSettings
has an array of the day names, but I can't see a way to get that from a
Date. (FormatDateTime has long versions like dddd to get the full day
name, and ddd for the short day name, likewise with months).


--

Matthew Jones
Tue, Mar 29 2016 6:52 AMPermanent Link

Uli Becker

Matthew,

> Also, how can I get the day of the week from a Date? The FormatSettings
> has an array of the day names, but I can't see a way to get that from a
> Date. (FormatDateTime has long versions like dddd to get the full day
> name, and ddd for the short day name, likewise with months).

I think you are looking for WeekDayOf()

Uli
Tue, Mar 29 2016 8:20 AMPermanent Link

Matthew Jones

Uli Becker wrote:

> I think you are looking for WeekDayOf()

Sounds ideal! Would be nice to have some relevant functions links
within the help, perhaps for Date or other such function.

--

Matthew Jones
Tue, Mar 29 2016 10:23 AMPermanent Link

Uli Becker

Matthew,

> Sounds ideal! Would be nice to have some relevant functions links
> within the help, perhaps for Date or other such function.

Actually I had to search for this in the newsgroups using the webinterface.
What I found was a 2-year old post from you Smile

http://tinyurl.com/jxofosv

Uli
Tue, Mar 29 2016 11:30 AMPermanent Link

Matthew Jones

Uli Becker wrote:

> What I found was a 2-year old post from you

As I've just said somewhere (probably here!) I learn and then forget
the details... I must get better, but development is changing so much
at the moment...

--

Matthew Jones
Tue, Mar 29 2016 4:52 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Matthew,

<< Sounds ideal! Would be nice to have some relevant functions links within the help, perhaps for Date or other such function. >>

There's a whole section for the available functions/procedures, or are you talking about categories for them ?

http://www.elevatesoft.com/manual?action=topics&id=ewb2&section=function_and_procedure_reference

Tim Young
Elevate Software
www.elevatesoft.com
Wed, Mar 30 2016 5:07 AMPermanent Link

Matthew Jones

Tim Young [Elevate Software] wrote:

> There's a whole section for the available functions/procedures, or
> are you talking about categories for them ?

Hmm, that's something I don't see in the online help because nothing
guides me to it. Perhaps it might be sensible to both have the full
list, and a by-category list. Then things like Date can have a link to
the "Date/Time functions category".

Most of my searching in the EWB help is using the index, so if it isn't
there then I won't find it easily. It would be nice to be able to
search the whole help in some way, but that's pushing it perhaps.

Fundamentally, a place where I can be taken to for "everything to do
with Dates/Times" and similar categories would be handy.

--

Matthew Jones
Wed, Mar 30 2016 6:59 PMPermanent Link

Raul

Team Elevate Team Elevate

On 3/30/2016 5:07 AM, Matthew Jones wrote:
> Hmm, that's something I don't see in the online help because nothing
> guides me to it.

Can you clarify ? Web help and one built into EWB use exactly the same
top level structure and "Function and Procedure Reference" is on top
level for both - and it's the "master" list of all functions/procedures
available in language.

> Perhaps it might be sensible to both have the full
> list, and a by-category list. Then things like Date can have a link to
> the "Date/Time functions category".

It would be nice but online version IMHO is still very usable. Function
reference is just 2 pages and browser search works great - "date" give
some 10 highlights and "day" gives 2.


Raul
Thu, Mar 31 2016 4:35 AMPermanent Link

Matthew Jones

Raul wrote:

> > Hmm, that's something I don't see in the online help because nothing
> > guides me to it.
>
> Can you clarify ? Web help and one built into EWB use exactly the
> same top level structure and "Function and Procedure Reference" is on
> top level for both - and it's the "master" list of all
> functions/procedures available in language.

Yes, but in my mind I'm thinking "Date" and "Dayof" is close by in the
index, and nothing else. If there was a link in the Date page to the
procedure reference to a list of all the date and time functions, I'd
be lead to the answer I seek easily. I never thought to switch from the
index view to the contents view, and then find the list of functions.
Maybe just me being daft, but I'm sure others would benefit from more
cross-links to focussed indices. (Not the biggest priority of course,
but a perfect Thursday afternoon filler for those times when the big
activity is done and you don't want to start anything big... 8-)

--

Matthew Jones
Image