Quantcast

Lasso 9.2.3 Issue Converting Datetimes with AM PM

classic Classic list List threaded Threaded
6 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]>
Loading...