Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

6 May, 2024: The networking issue during the past two days has been identified and may be fixed. Will keep monitoring.


devel / comp.lang.xharbour / Re: convert cell value 'dd-mm-yyyy hh:mm' in excel to text

SubjectAuthor
* convert cell value 'dd-mm-yyyy hh:mm' in excel to texttimepro timesheet
`* convert cell value 'dd-mm-yyyy hh:mm' in excel to textClaudio H
 `* convert cell value 'dd-mm-yyyy hh:mm' in excel to texttimepro timesheet
  `* convert cell value 'dd-mm-yyyy hh:mm' in excel to textAriel Paredes
   `- convert cell value 'dd-mm-yyyy hh:mm' in excel to texttimepro timesheet

1
convert cell value 'dd-mm-yyyy hh:mm' in excel to text

<a3ac104f-5cd5-409e-ba38-5acf3b3dc4aan@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10593&group=comp.lang.xharbour#10593

  copy link   Newsgroups: comp.lang.xharbour
X-Received: by 2002:a05:620a:151b:b0:6bb:5508:59bb with SMTP id i27-20020a05620a151b00b006bb550859bbmr3376568qkk.55.1661441279281;
Thu, 25 Aug 2022 08:27:59 -0700 (PDT)
X-Received: by 2002:a25:6611:0:b0:67b:e0c2:3239 with SMTP id
a17-20020a256611000000b0067be0c23239mr3732894ybc.18.1661441278960; Thu, 25
Aug 2022 08:27:58 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.xharbour
Date: Thu, 25 Aug 2022 08:27:58 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=96.242.45.184; posting-account=jZAeNwoAAABYWjMRM-FfqKkHfC3Iph0l
NNTP-Posting-Host: 96.242.45.184
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a3ac104f-5cd5-409e-ba38-5acf3b3dc4aan@googlegroups.com>
Subject: convert cell value 'dd-mm-yyyy hh:mm' in excel to text
From: timecost...@gmail.com (timepro timesheet)
Injection-Date: Thu, 25 Aug 2022 15:27:59 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1368
 by: timepro timesheet - Thu, 25 Aug 2022 15:27 UTC

in a downloaded excel file, cell(21,14) is '07-22-2022 15:11:00'
( 'dd-mm-yyyy hh:mm' )

my .prg:
einvackdt:=osheet:cells(21,14):value
-type('einvackdt') shows as 'T'
it crashes at 'oridate= dtoc(date())+einvactdt' -and- 'oriackno=einvori+einvackdt' && (einvori is a string)

-how to convert einvackdt to text/character/str

thanks

Re: convert cell value 'dd-mm-yyyy hh:mm' in excel to text

<e48c5b34-e31d-4508-bc96-1f7f44d4ae29n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10594&group=comp.lang.xharbour#10594

  copy link   Newsgroups: comp.lang.xharbour
X-Received: by 2002:a05:6214:f0e:b0:496:e627:2d26 with SMTP id gw14-20020a0562140f0e00b00496e6272d26mr4430193qvb.42.1661445625810;
Thu, 25 Aug 2022 09:40:25 -0700 (PDT)
X-Received: by 2002:a05:6902:1502:b0:695:a994:475c with SMTP id
q2-20020a056902150200b00695a994475cmr4126326ybu.547.1661445625426; Thu, 25
Aug 2022 09:40:25 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.xharbour
Date: Thu, 25 Aug 2022 09:40:25 -0700 (PDT)
In-Reply-To: <a3ac104f-5cd5-409e-ba38-5acf3b3dc4aan@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=181.47.6.188; posting-account=HpimJAoAAAB9g4YwFxxrm8_5y018T6ul
NNTP-Posting-Host: 181.47.6.188
References: <a3ac104f-5cd5-409e-ba38-5acf3b3dc4aan@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <e48c5b34-e31d-4508-bc96-1f7f44d4ae29n@googlegroups.com>
Subject: Re: convert cell value 'dd-mm-yyyy hh:mm' in excel to text
From: clau...@herszage.com (Claudio H)
Injection-Date: Thu, 25 Aug 2022 16:40:25 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1211
 by: Claudio H - Thu, 25 Aug 2022 16:40 UTC

https://www.excel-easy.com/vba/date-time.html

Claudio H

Re: convert cell value 'dd-mm-yyyy hh:mm' in excel to text

<61e0793c-cf3e-400d-ad30-6916989969d2n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10597&group=comp.lang.xharbour#10597

  copy link   Newsgroups: comp.lang.xharbour
X-Received: by 2002:a05:620a:561:b0:6b6:1b3a:5379 with SMTP id p1-20020a05620a056100b006b61b3a5379mr5150466qkp.111.1661477802171;
Thu, 25 Aug 2022 18:36:42 -0700 (PDT)
X-Received: by 2002:a25:938c:0:b0:695:7952:6ed7 with SMTP id
a12-20020a25938c000000b0069579526ed7mr5868981ybm.116.1661477801760; Thu, 25
Aug 2022 18:36:41 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.xharbour
Date: Thu, 25 Aug 2022 18:36:41 -0700 (PDT)
In-Reply-To: <e48c5b34-e31d-4508-bc96-1f7f44d4ae29n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=96.242.45.184; posting-account=jZAeNwoAAABYWjMRM-FfqKkHfC3Iph0l
NNTP-Posting-Host: 96.242.45.184
References: <a3ac104f-5cd5-409e-ba38-5acf3b3dc4aan@googlegroups.com> <e48c5b34-e31d-4508-bc96-1f7f44d4ae29n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <61e0793c-cf3e-400d-ad30-6916989969d2n@googlegroups.com>
Subject: Re: convert cell value 'dd-mm-yyyy hh:mm' in excel to text
From: timecost...@gmail.com (timepro timesheet)
Injection-Date: Fri, 26 Aug 2022 01:36:42 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1867
 by: timepro timesheet - Fri, 26 Aug 2022 01:36 UTC

On Thursday, August 25, 2022 at 10:10:26 PM UTC+5:30, Claudio H wrote:
> https://www.excel-easy.com/vba/date-time.html
>
> Claudio H
thanks claudio:

please, would you also type the 'xhb syntax' to convert. data type 'T' to data type 'C'

my example:
'einvackdt:=osheet:cells(21,14):value' (Type T)
? einvackdt shows 17-04-2022 15:11:00
einvackdt1=dtoc(einvackdt) WORKS but (obviously) gives only the date.
i tried :
xxx=str(einvackdt)
xxx=substr(einvackdt,11,6) && THIS CRASHES
xxx=val(einvackdt) && gives 0
xxx=right(einvackdt,8)
but xxx does not show '15:11:00'

is there a func similar to dtoc() like a ttoc().....

Re: convert cell value 'dd-mm-yyyy hh:mm' in excel to text

<f9531f12-c61d-4fd1-a6df-e59d807dacbcn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10600&group=comp.lang.xharbour#10600

  copy link   Newsgroups: comp.lang.xharbour
X-Received: by 2002:a05:622a:174b:b0:343:1fc:14d8 with SMTP id l11-20020a05622a174b00b0034301fc14d8mr3941451qtk.579.1661617517265;
Sat, 27 Aug 2022 09:25:17 -0700 (PDT)
X-Received: by 2002:a05:6902:1502:b0:695:a994:475c with SMTP id
q2-20020a056902150200b00695a994475cmr3623078ybu.547.1661617516990; Sat, 27
Aug 2022 09:25:16 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border-2.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.xharbour
Date: Sat, 27 Aug 2022 09:25:16 -0700 (PDT)
In-Reply-To: <61e0793c-cf3e-400d-ad30-6916989969d2n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2806:10b7:2:181b:394c:5e6c:8f8d:85b5;
posting-account=yPVU0woAAABt-Dryqf89b-v6ZIg0f0od
NNTP-Posting-Host: 2806:10b7:2:181b:394c:5e6c:8f8d:85b5
References: <a3ac104f-5cd5-409e-ba38-5acf3b3dc4aan@googlegroups.com>
<e48c5b34-e31d-4508-bc96-1f7f44d4ae29n@googlegroups.com> <61e0793c-cf3e-400d-ad30-6916989969d2n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f9531f12-c61d-4fd1-a6df-e59d807dacbcn@googlegroups.com>
Subject: Re: convert cell value 'dd-mm-yyyy hh:mm' in excel to text
From: arielsol...@gmail.com (Ariel Paredes)
Injection-Date: Sat, 27 Aug 2022 16:25:17 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 53
 by: Ariel Paredes - Sat, 27 Aug 2022 16:25 UTC

El jueves, 25 de agosto de 2022 a las 20:36:42 UTC-5, timec...@gmail.com escribió:
> On Thursday, August 25, 2022 at 10:10:26 PM UTC+5:30, Claudio H wrote:
> > https://www.excel-easy.com/vba/date-time.html
> >
> > Claudio H
> thanks claudio:
>
> please, would you also type the 'xhb syntax' to convert. data type 'T' to data type 'C'
>
> my example:
> 'einvackdt:=osheet:cells(21,14):value' (Type T)
> ? einvackdt shows 17-04-2022 15:11:00
> einvackdt1=dtoc(einvackdt) WORKS but (obviously) gives only the date.
> i tried :
> xxx=str(einvackdt)
> xxx=substr(einvackdt,11,6) && THIS CRASHES
> xxx=val(einvackdt) && gives 0
> xxx=right(einvackdt,8)
> but xxx does not show '15:11:00'
>
> is there a func similar to dtoc() like a ttoc().....

Try

TtoC()
Converts a DateTime value to a character string in SET DATE and SET TIME format.
Syntax
TtoC( <dDateTime> ) --> cDateTimeString
Arguments
<dDateTime>
The parameter must be a value of data type Date or DateTime.
Return
The return value is a character string formatted in the current SET DATE and SET TIME format.
Description
The function converts a DateTime value to a character string. The string is formatted according to the current SET DATE and SET TIME format.
Important: use TtoC() and its counterpart CtoT() with extreme care. The result of both functions depends on the current SET DATE, SET EPOCH and SET TIME settings.
Info
See also: DateTime(), DtoC(), SET CENTURY, SET DATE, SET EPOCH, SET TIME, StoT(), TtoC(), TtoS()
Category: Conversion functions, Date and time, xHarbour extensions
Source: rtl\dateshb.c
LIB: xhb.lib
DLL: xhbdll.dll
1842

Re: convert cell value 'dd-mm-yyyy hh:mm' in excel to text

<952e86b1-3217-41db-b2d1-37d1b738110en@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10601&group=comp.lang.xharbour#10601

  copy link   Newsgroups: comp.lang.xharbour
X-Received: by 2002:ae9:ed89:0:b0:6bb:9968:de30 with SMTP id c131-20020ae9ed89000000b006bb9968de30mr4430577qkg.774.1661654209490;
Sat, 27 Aug 2022 19:36:49 -0700 (PDT)
X-Received: by 2002:a81:c84:0:b0:33d:a67b:168b with SMTP id
126-20020a810c84000000b0033da67b168bmr5426766ywm.148.1661654209334; Sat, 27
Aug 2022 19:36:49 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.xharbour
Date: Sat, 27 Aug 2022 19:36:49 -0700 (PDT)
In-Reply-To: <f9531f12-c61d-4fd1-a6df-e59d807dacbcn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=96.242.45.184; posting-account=jZAeNwoAAABYWjMRM-FfqKkHfC3Iph0l
NNTP-Posting-Host: 96.242.45.184
References: <a3ac104f-5cd5-409e-ba38-5acf3b3dc4aan@googlegroups.com>
<e48c5b34-e31d-4508-bc96-1f7f44d4ae29n@googlegroups.com> <61e0793c-cf3e-400d-ad30-6916989969d2n@googlegroups.com>
<f9531f12-c61d-4fd1-a6df-e59d807dacbcn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <952e86b1-3217-41db-b2d1-37d1b738110en@googlegroups.com>
Subject: Re: convert cell value 'dd-mm-yyyy hh:mm' in excel to text
From: timecost...@gmail.com (timepro timesheet)
Injection-Date: Sun, 28 Aug 2022 02:36:49 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3655
 by: timepro timesheet - Sun, 28 Aug 2022 02:36 UTC

On Saturday, August 27, 2022 at 9:55:17 PM UTC+5:30, arielso...@gmail.com wrote:
> El jueves, 25 de agosto de 2022 a las 20:36:42 UTC-5, timec...@gmail.com escribió:
> > On Thursday, August 25, 2022 at 10:10:26 PM UTC+5:30, Claudio H wrote:
> > > https://www.excel-easy.com/vba/date-time.html
> > >
> > > Claudio H
> > thanks claudio:
> >
> > please, would you also type the 'xhb syntax' to convert. data type 'T' to data type 'C'
> >
> > my example:
> > 'einvackdt:=osheet:cells(21,14):value' (Type T)
> > ? einvackdt shows 17-04-2022 15:11:00
> > einvackdt1=dtoc(einvackdt) WORKS but (obviously) gives only the date.
> > i tried :
> > xxx=str(einvackdt)
> > xxx=substr(einvackdt,11,6) && THIS CRASHES
> > xxx=val(einvackdt) && gives 0
> > xxx=right(einvackdt,8)
> > but xxx does not show '15:11:00'
> >
> > is there a func similar to dtoc() like a ttoc().....
> Try
>
> TtoC()
> Converts a DateTime value to a character string in SET DATE and SET TIME format.
> Syntax
> TtoC( <dDateTime> ) --> cDateTimeString
> Arguments
> <dDateTime>
> The parameter must be a value of data type Date or DateTime.
> Return
> The return value is a character string formatted in the current SET DATE and SET TIME format.
> Description
> The function converts a DateTime value to a character string. The string is formatted according to the current SET DATE and SET TIME format.
> Important: use TtoC() and its counterpart CtoT() with extreme care. The result of both functions depends on the current SET DATE, SET EPOCH and SET TIME settings.
> Info
> See also: DateTime(), DtoC(), SET CENTURY, SET DATE, SET EPOCH, SET TIME, StoT(), TtoC(), TtoS()
> Category: Conversion functions, Date and time, xHarbour extensions
> Source: rtl\dateshb.c
> LIB: xhb.lib
> DLL: xhbdll.dll
> 1842

thank you ariel:

i believe experimenting with ttoc(), but linking crashed.
-or, maybe i had typed toc() instead of ttoc() in my prg.
anyhoo, i will try now with ttoc(einvackdt) // einvackdt=17-04-2022 15:11:00
(set epoch to 1960, set cent on). but i have not 'set time'

regards

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor