Source language: Translate to:

datelong?

General questions about NeoBook

Moderator: Neosoft Support

datelong?

Postby yanzco » Sun Aug 10, 2014 12:40 am

hello,

i know that the datelong variable displays the complete date (for today)

Saturday, August 09,2014

what i want is,

if i have a date, 08/09/2014

how can i convert it into the long version..

i already got the month, day and year part.. i just dont know how to get the (sunday, monday, tuesday) thing...

any ideas?

(im using Neo Datepicker to select dates from the calendar btw)
yanzco
 
Posts: 178
Joined: Sun Jul 20, 2014 4:07 am

Re: datelong?

Postby HPW » Sun Aug 10, 2014 2:02 am

Hello,

Take a look at NumToDate in the doc.
For example, entering "d/m/yyy" will result in a date formatted as Day/Month/Year or "3/15/2008". Entering "dddd, mmmm m, yyyy" will result in a date formatted as "Saturday, March 15, 2008".

Together with DateToNum it should do the job.

Regards
Hans-Peter
User avatar
HPW
 
Posts: 2521
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Re: datelong?

Postby yanzco » Sun Aug 10, 2014 6:47 am

got it to work... thanks HPW!
yanzco
 
Posts: 178
Joined: Sun Jul 20, 2014 4:07 am

Re: datelong?

Postby elcoco6262 » Fri Mar 27, 2015 4:42 am

Hello
J'ai fait le teste avec l'exemple en dessous
DateToNum "[DBFile.DATE]" "Default" "[DateLong2]"
NumToDate "[DateLong2]" "dddd mmmm m yyyy" "[DateLong3]"

mais pour les années 19xx, il inscrit 20xx. Exemple 1978, il inscrit 2078 !?
De plus en dessous des années 2000 le jour de la semaine est déplacé d'un jour en moins, donc samedi devient vendredi.
Merci pour vos réponses.

Traduction Google-Translate:
Hello
I have tested it with the example below
DateToNum "[DBFile.DATE]" "Default" "[DateLong2]"
NumToDate "[DateLong2]" "dddd mmm yyyy" "[DateLong3]"

but for years 19xx, 20xx he scored. Example 1978, he enrolled in 2078?
Also below the 2000s on the day of the week is moved from one day to witness, so Saturday is Friday.
Thank you for your answers.
elcoco6262
 
Posts: 13
Joined: Wed Nov 19, 2014 3:36 am

Re: datelong?

Postby Gaev » Fri Mar 27, 2015 5:42 am

elcoco6262:

but for years 19xx, 20xx he scored. Example 1978, he enrolled in 2078?


According to (English) Help file ...
A formatted date consisting of two or three numbers, separated by “\”, “/” or “-”. Year values between 0 and 99 are assumed to be in the current century. The date must match the format parameter below.


So do something like this ...
Code: Select all
AlertBox "DBFile.DATE" "[DBFile.DATE]"
... and post the result here.

If your result is something like 1/31/78 ... it assumes 2078 ... if all your dates are for year 19xx, you can insert 19 before the year like this ...
Code: Select all
... split date into parts
StrParse "[DBFile.DATE]" "!/" "[DatePart]" "[count]"
SetVar "[DateLong1]" "![DatePart1]/[DatePart2]/19[DatePart3]"
... now do conversion
DateToNum "[Datelong1]" "Default" "[DateLong2]"
NumToDate "[DateLong2]" "dddd mmm yyyy" "[DateLong3]"

Note: I am assuming that the separator is "/"; if not, change it in the StrParse command as appropriate.
User avatar
Gaev
 
Posts: 3737
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: datelong?

Postby elcoco6262 » Wed Apr 08, 2015 1:59 am

Gaev wrote:elcoco6262:


A formatted date consisting of two or three numbers, separated by “\”, “/” or “-”. Year values between 0 and 99 are assumed to be in the current century. The date must match the format parameter below.



Merci à Gaev, :oops: désolé pour le retard de ma réponse... congés de Pâques ! ;-)
J’ai configuré la représentation de la "date système" avec une valeur d'année à 4 chiffres et tout est rentré dans l'ordre.

Thank you to Gaev, :oops: sorry for the delay in replying ... Easter holidays! ;-)
I configured the representation of the "system date" with a 4-digit year value and everything is back in order. thank you again
elcoco6262
 
Posts: 13
Joined: Wed Nov 19, 2014 3:36 am


Return to General NeoBook Discussions

Who is online

Users browsing this forum: No registered users and 1 guest