Lasso 9.2.3 Issue Converting Datetimes with AM PM

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Lasso 9.2.3 Issue Converting Datetimes with AM PM

Mark Romano
I’m migrating code from Lasso 8.6 to Lasso 9.2.3 and running into a datetime conversion issue;

As soon as I wrap the datetime value with date() it seems to ignore or remove the AM PM portion, causing all datetime values to convert as AM.

Example:

local(my_date) = date('01/01/2017 08:40:00 PM');

local(my_new_date) = date(#my_date, -format='%Q %T');

// => 2017-01-01 08:40:00


Any suggestions here?



Thank you,

Mark Romano





#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Lasso 9.2.3 Issue Converting Datetimes with AM PM

Ke Carlton-3
Try specifying the format when your convert the string to a date:

local(date) = date('01/01/2017 08:40:00 PM', -format = 'dd/MM/yyyy hh:mm:ss
a')

#date->format('%Q %T') // 2017-01-01 20:40:00

Ke



On Fri, 17 Feb 2017 at 08:41, Mark Romano <[hidden email]> wrote:

I’m migrating code from Lasso 8.6 to Lasso 9.2.3 and running into a
datetime conversion issue;

As soon as I wrap the datetime value with date() it seems to ignore or
remove the AM PM portion, causing all datetime values to convert as AM.

Example:

local(my_date) = date('01/01/2017 08:40:00 PM');

local(my_new_date) = date(#my_date, -format='%Q %T');

// => 2017-01-01 08:40:00


Any suggestions here?



Thank you,

Mark Romano





#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Lasso 9.2.3 Issue Converting Datetimes with AM PM

Brad Lindsay
You might also want to update to 9.2.7 to see if they fixed the issue

Brad



On February 16, 2017 at 3:37:15 PM, Ke Carlton ([hidden email]) wrote:

> Try specifying the format when your convert the string to a date:
>
> local(date) = date('01/01/2017 08:40:00 PM', -format = 'dd/MM/yyyy hh:mm:ss
> a')
>
> #date->format('%Q %T') // 2017-01-01 20:40:00
>
> Ke
>
>
>
> On Fri, 17 Feb 2017 at 08:41, Mark Romano wrote:
>
> I’m migrating code from Lasso 8.6 to Lasso 9.2.3 and running into a
> datetime conversion issue;
>
> As soon as I wrap the datetime value with date() it seems to ignore or
> remove the AM PM portion, causing all datetime values to convert as AM.
>
> Example:
>
> local(my_date) = date('01/01/2017 08:40:00 PM');
>
> local(my_new_date) = date(#my_date, -format='%Q %T');
>
> // => 2017-01-01 08:40:00
>
>
> Any suggestions here?
>
>
>
> Thank you,
>
> Mark Romano
>
>
>
>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
> the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to:
> Send administrative queries to
>
> #############################################################
>
> This message is sent to you because you are subscribed to
> the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to:
> Send administrative queries to

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Lasso 9.2.3 Issue Converting Datetimes with AM PM

Ke Carlton-3
I'm not sure it was ever a thing? — maybe in L8.x.

In 9.3.2 it doesn't either:

local(date) = date('01/01/2017 08:40:00 pm')
#date->format('%Q %T') // 2017-01-01 08:40:00
lasso_version // Mac OS X 9.3.2

Ke

On Fri, Feb 17, 2017 at 10:57 AM Brad Lindsay <[hidden email]> wrote:

You might also want to update to 9.2.7 to see if they fixed the issue

Brad



On February 16, 2017 at 3:37:15 PM, Ke Carlton ([hidden email]) wrote:
> Try specifying the format when your convert the string to a date:
>
> local(date) = date('01/01/2017 08:40:00 PM', -format = 'dd/MM/yyyy
hh:mm:ss
> a')
>
> #date->format('%Q %T') // 2017-01-01 20:40:00
>
> Ke

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Lasso 9.2.3 Issue Converting Datetimes with AM PM

Johan Solve
Yes actually it was in L8

local('date') = date('01/01/2017 08:40:00 pm');
#date->format('%Q %T'); // 2017-01-01 20:40:00
lasso_version; // Mac OS X 8.6.3


On 16 February 2017 at 23:04, Ke Carlton <[hidden email]> wrote:

> I'm not sure it was ever a thing? — maybe in L8.x.
>
> In 9.3.2 it doesn't either:
>
> local(date) = date('01/01/2017 08:40:00 pm')
> #date->format('%Q %T') // 2017-01-01 08:40:00
> lasso_version // Mac OS X 9.3.2
>
> Ke
>
> On Fri, Feb 17, 2017 at 10:57 AM Brad Lindsay <[hidden email]> wrote:
>
> You might also want to update to 9.2.7 to see if they fixed the issue
>
> Brad
>
>
>
> On February 16, 2017 at 3:37:15 PM, Ke Carlton ([hidden email]) wrote:
> > Try specifying the format when your convert the string to a date:
> >
> > local(date) = date('01/01/2017 08:40:00 PM', -format = 'dd/MM/yyyy
> hh:mm:ss
> > a')
> >
> > #date->format('%Q %T') // 2017-01-01 20:40:00
> >
> > Ke
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>   the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>
>



--
Mvh
Johan Sölve
____________________________________
Montania System AB
Halmstad   Stockholm
http://www.montania.se

Johan Sölve
Mobil +46 709-51 55 70
[hidden email]

Kristinebergsvägen 17, S-302 41 Halmstad, Sweden
Telefon +46 35-136800 |  Fax +46 35-136801

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Lasso 9.2.3 Issue Converting Datetimes with AM PM

Mark Romano
In reply to this post by Mark Romano
Thank you Ke Carlton. Your suggestion worked perfectly.

local(date) = date('01/01/2017 08:40:00 PM', -format = 'dd/MM/yyyy hh:mm:ss a')

#date->format('%Q %T') // 2017-01-01 20:40:00



Thank you,

Mark Romano
818-653-0957



> On Feb 16, 2017, at 11:41 AM, Mark Romano <[hidden email]> wrote:
>
> I’m migrating code from Lasso 8.6 to Lasso 9.2.3 and running into a datetime conversion issue;
>
> As soon as I wrap the datetime value with date() it seems to ignore or remove the AM PM portion, causing all datetime values to convert as AM.
>
> Example:
>
> local(my_date) = date('01/01/2017 08:40:00 PM');
>
> local(my_new_date) = date(#my_date, -format='%Q %T');
>
> // => 2017-01-01 08:40:00
>
>
> Any suggestions here?
>
>
>
> Thank you,
>
> Mark Romano
>
>
>
>


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

parse_csv for Lasso 9

Mark Romano
Does anyone have an updated version of Johan Slove’s [parse_csv] that works in Lasso 9?

http://www.lassosoft.com/tagswap/detail/parse_csv


Thank you,

Mark Romano



#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: parse_csv for Lasso 9

Marc Pinnell-3
Can’t send a file via the list, sent it to you directly. I must have modified Johan’s at some point to get it to work with L9, but honestly don’t remember what I did. :)

Marc

====================
Marc Pinnell
Director of Web Services
[hidden email]
www.shasta.com                                    
833 Mistletoe Lane, Suite A1
Redding, CA  96002
530-224-6866  Ext. 100
530-224-2035 Fax

> On May 19, 2017, at 8:49 PM, Mark Romano <[hidden email]> wrote:
>
> Does anyone have an updated version of Johan Slove’s [parse_csv] that works in Lasso 9?
>
> http://www.lassosoft.com/tagswap/detail/parse_csv
>
>
> Thank you,
>
> Mark Romano
>
>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: parse_csv for Lasso 9

Alex Betz-3
If you are happy to share the work, why don't you put it up on git hub? Sounds like something that could be useful for many

Best
Alex

Sent from my iPhone

> On 20 May 2017, at 15:31, Marc Pinnell <[hidden email]> wrote:
>
> Can’t send a file via the list, sent it to you directly. I must have modified Johan’s at some point to get it to work with L9, but honestly don’t remember what I did. :)
>
> Marc
>
> ====================
> Marc Pinnell
> Director of Web Services
> [hidden email]
> www.shasta.com                                    
> 833 Mistletoe Lane, Suite A1
> Redding, CA  96002
> 530-224-6866  Ext. 100
> 530-224-2035 Fax
>
>> On May 19, 2017, at 8:49 PM, Mark Romano <[hidden email]> wrote:
>>
>> Does anyone have an updated version of Johan Slove’s [parse_csv] that works in Lasso 9?
>>
>> http://www.lassosoft.com/tagswap/detail/parse_csv
>>
>>
>> Thank you,
>>
>> Mark Romano
>>
>>
>>
>> #############################################################
>>
>> This message is sent to you because you are subscribed to
>> the mailing list Lasso [hidden email]
>> Official list archives available at http://www.lassotalk.com
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: parse_csv for Lasso 9

Mark Romano
In reply to this post by Mark Romano
The parse_csv file looks to work for both L8.6 & L 9. However, I’m still struggling with the correct way to work with the output in Lasso 9.

In Lasso 8.6 the output returned an array of maps. In Lasso 9 I’m getting an array within an array.

Here’s an example:

A B C D
1 2 3 4
1 2 3 4
1 2 3 4

L 8.6 output:
$csv_output = array: (map: (A)=(1), (B)=(2), (C)=(3), (D)=(4)), (map: (A)=(1), (B)=(2), (C)=(3), (D)=(4)), (map: (A)=(1), (B)=(2), (C)=(3), (D)=(4))

I would iterate the array with something like this:

 Iterate( $csv_output, local('i') );
  #i->Find(‘A’) + ‘ ‘ + #i->Find(‘B’)
  /Iterate;

L 9 output:
$csv_output = array(array(A,B,C,D 1,2,3,4 1,2,3,4 1,2,3,4))

Tried this, but it isn’t working:

with x in $csv_output do => {^
        var(new_output = #x(::A) + ' ' + #x(::B)  )
^}

Any help here would be greatly appreciated.



Thank you,

Mark Romano




#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: parse_csv for Lasso 9

Ke Carlton-3
Something like this:


local(output) = array(
array('A','B','C','D'),
array(1,2,3,4),
array(1,2,3,4),
array(1,2,3,4)
)

local(cols) = #output->first

with row in #output
skip 1
do {
    with i in 1 to #cols->size do {
    debug( #cols->get(#i) = #row->get(#i) )
    }
}





On Tue, May 23, 2017 at 4:38 PM Mark Romano <[hidden email]> wrote:

> The parse_csv file looks to work for both L8.6 & L 9. However, I’m still
> struggling with the correct way to work with the output in Lasso 9.
>
> In Lasso 8.6 the output returned an array of maps. In Lasso 9 I’m getting
> an array within an array.
>
> Here’s an example:
>
> A       B       C       D
> 1       2       3       4
> 1       2       3       4
> 1       2       3       4
>
> L 8.6 output:
> $csv_output = array: (map: (A)=(1), (B)=(2), (C)=(3), (D)=(4)), (map:
> (A)=(1), (B)=(2), (C)=(3), (D)=(4)), (map: (A)=(1), (B)=(2), (C)=(3),
> (D)=(4))
>
> I would iterate the array with something like this:
>
>  Iterate( $csv_output, local('i') );
>         #i->Find(‘A’) + ‘ ‘ + #i->Find(‘B’)
>   /Iterate;
>
> L 9 output:
> $csv_output = array(array(A,B,C,D 1,2,3,4 1,2,3,4 1,2,3,4))
>
> Tried this, but it isn’t working:
>
> with x in $csv_output do => {^
>         var(new_output = #x(::A) + ' ' + #x(::B)  )
> ^}
>
> Any help here would be greatly appreciated.
>
>
>
> Thank you,
>
> Mark Romano
>
>
>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>   the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Loading...