05. august 2003 - 11:25Der er
5 kommentarer og 2 løsninger
tilføj dage til dato
jeg har en tekstboks (a) der bliver udfyldt af en parameterboks som et datoformat. dernæst har jeg en tekstboks (b) som selv skal udfyldes ved at tilføje x antal dage til (a) således at der kommer til at stå den første dag i den efterfølgende måned.
f.eks: (a)= 20-05-2003 hvorefter (b) så skal have værdien 01-06-2003
I dette særtema ser vi på, hvordan cloud og AI bliver fundamentet for virksomhedernes digitale forretning, og hvordan de nye muligheder for automatisering og forretningsværdi kan udnyttes uden at miste overblik, sikkerhed og menneskelig kontrol.
jo men det skal ikke være ud fra now() det skal være ud fra den dag der er indtastet i det første felt... hvis man taster "20-01-2001" i det første felt, skal det andet blive til: "01-02-2001"
Jeg har da ikke nævnt noget om now(), mon ikke du har standardværdien =now() i dit FakturaDato-felt...
Du skal jo beregne Betalingsfristen ved udgang af FakturaDato-feltet... Eller endnu bedre: helt lade være med at gemme denne information, da du jo altid kan beregne den korrekte forfaldsdato ud fra fakturadatoen i en forespørgsel...
Displaying Specific Dates To display specific dates, you can use the DateSerial() function to manipulate the day, month, and year portions of a date. For example, you can use the following expressions in the ControlSource property of a text box or in the Debug window (or the Immediate window in versions 1.x and 2.0) to return specific dates: • The current month: DateSerial(Year(Date()), Month(Date()), 1) • The next month: DateSerial(Year(Date()), Month(Date()) + 1, 1) • The last day of the current month: DateSerial(Year(Date()), Month(Date()) + 1, 0) • The last day of the next month: DateSerial(Year(Date()), Month(Date()) + 2, 0) • The first day of the previous month: DateSerial(Year(Date()), Month(Date())-1,1) • The last day of the previous month: DateSerial(Year(Date()), Month(Date()),0) • The first day of the current quarter: DateSerial(Year(Date()), Int((Month(Date()) - 1) / 3) * 3 + 1, 1) • The last day of the current quarter: DateSerial(Year(Date()), Int((Month(Date()) - 1) / 3) * 3 + 4, 0) • The first day of the current week (assuming Sunday = day 1): Date() - WeekDay(Date()) + 1 • The last day of the current week: Date() - WeekDay(Date()) + 7 • The first day of the current week (using settings in Options dialog box): Date() - WeekDay(Date(), 0) + 1 • The last day of the current week: Date() - WeekDay(Date(), 0) + 7
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.