viewpoint-particle

Author Topic: Omnibus Extender - Dates  (Read 98 times)

JTaylor

  • Pundit
  • *****
  • Posts: 1880
    • Data & Stuff Inc.
Omnibus Extender - Dates
« on: February 26, 2023, 09:11:38 pm »
I have added a new Function named snTimeMap().  This is a Beta version of the function and I would love some feedback.

It allows you to submit a date string and a template for how it should be interpreted and turn it into a usable date.   It breaks out the various parts/info in a Map.  Requires WinBatch 2021B and higher, I think.  Some predefined templates are provided.

See Help file for more info.   I would love to hear back.  I think there are some tweaks I need to make regarding assumptions about local vs GM time but wouldn't mind hearing from someone who knows what they are talking about.  Also, happy to add more items to Map or more predefined templates.

http://www.jtdata.com/anonymous/wbomnibus.zip

Thanks.


Jim

stanl

  • Pundit
  • *****
  • Posts: 1722
Re: Omnibus Extender - Dates
« Reply #1 on: February 27, 2023, 02:42:03 am »
Here is a lookup that might be helpful [tab delimited]

JTaylor

  • Pundit
  • *****
  • Posts: 1880
    • Data & Stuff Inc.
Re: Omnibus Extender - Dates
« Reply #2 on: February 27, 2023, 05:47:21 am »
Other than the Unix Epoch template, it currently returns the time as it is submitted, which is probably the way to go but wondered what others thought.  Leaving one to use the TimeZone functions to adjust, if needed.   Maybe I should switch Unix Epoch to assume local time and one could use the TimeZone functions to make any needed adjustments to it as well???  Although, I am thinking that Unix Epoch, by definition is GM time by definition....or am I thinking wrong?

Thanks.

Jim

JTaylor

  • Pundit
  • *****
  • Posts: 1880
    • Data & Stuff Inc.
Re: Omnibus Extender - Dates
« Reply #3 on: February 27, 2023, 12:58:03 pm »
I realized I was getting distracted from the purpose of this function.  It isn't to do any type of conversion related to timezones but to simply take a date string, even non-standard ones, and turn them into a usable date.  The point is to return the same date, as presented, but in a usable form. 

Jim

stanl

  • Pundit
  • *****
  • Posts: 1722
Re: Omnibus Extender - Dates
« Reply #4 on: February 27, 2023, 01:07:17 pm »
The point is to return the same date, as presented, but in a usable form. 

Jim


doesn't format() or ToString() do that?

JTaylor

  • Pundit
  • *****
  • Posts: 1880
    • Data & Stuff Inc.
Re: Omnibus Extender - Dates
« Reply #5 on: February 27, 2023, 01:14:20 pm »
Are those WinBatch functions?  Doesn't sound familiar in that context.   If speaking of TimeFormat() that assumes you have a Winbatch formatted date.

Jim

JTaylor

  • Pundit
  • *****
  • Posts: 1880
    • Data & Stuff Inc.
Re: Omnibus Extender - Dates
« Reply #6 on: February 27, 2023, 03:52:46 pm »
After some more research and getting back on track...this should resolve some issues.


http://www.jtdata.com/anonymous/wbomnibus.zip


Jim

JTaylor

  • Pundit
  • *****
  • Posts: 1880
    • Data & Stuff Inc.
Re: Omnibus Extender - Dates
« Reply #7 on: February 28, 2023, 06:59:13 am »
Also, just to clarify, in the event my earlier posts weren't clear, the point of this function isn't to format dates.  WinBatch already does that.   This is for processing data and avoiding the need to manipulate/reformat strings to get a date into a usable form.   It provides a flexible way to obtain a valid date you can use for whatever purpose you need.

Jim