FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WINDEV 2024
→
Reporting - Dates
Reporting - Dates
Débuté par Milton Kirkwood, 12 oct. 2005 09:44 - 2 réponses
Connectez-vous…
Milton Kirkwood
#1
Posté le 12 octobre 2005 - 09:44
Hi,
I am having trouble when using dates in a report because they do not print out in the required format. In the analysis I specified a date with entry mask DD/MM/YYYY and returned value as DDMMYYYY. For example, I entered 30th September 2005 as 30/09/2005 and it shows that way in the data entry form. When it prints out in a report it prints as 05/20/3009. I have tried various DateToString and StringToDate conversions but to no avail. I did get it working using the following code by setting global variables
Day is int
Month is int
Year is int
NewDate is string
and then using
Day=RequestDate
Month=RequestDate
Year=RequestDate
and constructing a date from thisusing -
NewDate=NumToString(Day,"02d")+NumToString(Month,"02d")+NumToString(Year,"4d")
DateRequired=NewDate
Although it worked it seems a difficult way to get a report to print a date as DD/MM/YYYY.
Can anyone help please?
Milton
Signaler
0
0
Teun van Unen
#2
Posté le 12 octobre 2005 - 12:42
Hello Milton,
Search in the archive with 'dates'. Then you get e.g.
http://f16.parsimony.net/forum28986/messages/19496.htm
Maybe this is the solution : Set the returned value to YYYYMMDD instead of DDMMYYYY)
HTH a little bit,
Teun.
Hi,
I am having trouble when using dates in a report because they do not print out in the required format. In the analysis I specified a date with entry mask DD/MM/YYYY and returned value as DDMMYYYY. For example, I entered 30th September 2005 as 30/09/2005 and it shows that way in the data entry form. When it prints out in a report it prints as 05/20/3009. I have tried various DateToString and StringToDate conversions but to no avail. I did get it working using the following code by setting global variables
Day is int
Month is int
Year is int
NewDate is string
and then using
Day=RequestDate
Month=RequestDate
Year=RequestDate
and constructing a date from thisusing -
NewDate=NumToString(Day,"02d")+NumToString(Month,"02d")+NumToString(Year,"4d")
DateRequired=NewDate
Although it worked it seems a difficult way to get a report to print a date as DD/MM/YYYY.
Can anyone help please?
Milton
Signaler
0
0
Milton Kirkwood
#3
Posté le 14 octobre 2005 - 00:07
Thanks Teun for your assistance.
Milton
Hello Milton,
Search in the archive with 'dates'. Then you get e.g.
http://f16.parsimony.net/forum28986/messages/19496.htm
Maybe this is the solution : Set the returned value to YYYYMMDD instead of DDMMYYYY)
HTH a little bit,
Teun.
Hi,
I am having trouble when using dates in a report because they do not print out in the required format. In the analysis I specified a date with entry mask DD/MM/YYYY and returned value as DDMMYYYY. For example, I entered 30th September 2005 as 30/09/2005 and it shows that way in the data entry form. When it prints out in a report it prints as 05/20/3009. I have tried various DateToString and StringToDate conversions but to no avail. I did get it working using the following code by setting global variables
Day is int
Month is int
Year is int
NewDate is string
and then using
Day=RequestDate
Month=RequestDate
Year=RequestDate
and constructing a date from thisusing -
NewDate=NumToString(Day,"02d")+NumToString(Month,"02d")+NumToString(Year,"4d")
DateRequired=NewDate
Although it worked it seems a difficult way to get a report to print a date as DD/MM/YYYY.
Can anyone help please?
Milton
Signaler
0
0
→ Revenir à WINDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (précédentes versions)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Type de recherche
Uniquement les sujets
Tous les messages
Période de recherche
Date indifférente
Moins d'une heure
Moins de 24 heures
Moins d'une semaine
Moins d'un mois
Moins d'un an
Annuler
Aperçu de votre message
Ajouter une image
Importer une image depuis une URL
Envoyer une image depuis un fichier de votre disque
Déposez ici un fichier ou cliquez sur "Parcourir..."
ou
Annuler
0%
WLangage
SQL
XML, HTML
JAVA, Javascript
Texte