Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need concatenate a date (come from a calendar) and a specificy hour to comparate with a date/hour come from DB.
per example:
A user select a date, 01/01/2010, and i need 01/01/2010 12:00:00 to compare a field.
i try
DATE(vDATA,'DD/MM/YYYY 12:00:00') where vDATA come from a calendar object but doesn´work!
Anyone have some idea???
tks!!!!
Try
vDATA+MakeTime(12)
or if you need the formatted version:
Timestamp(vDATA+MakeTime(12))
-Rob
You can make it by many different ways. Here are some:
= date#('01/01/2010') & ' \n' &
date( date#('01/01/2010') + 12/24, 'M/D/YYYY hh:mm:ss[.fff]') & ' \n' &
date( date#('01/01/2010') & ' 12:00:00', 'M/D/YYYY hh:mm:ss[.fff]')Is not work when i put a variable!!!
Field or Variable?
All what you need is to replace this date#('01/01/2010') by field name. Or if you use a variable, maybe, you need to convert data from variable into proper date or string type according to approach which you've decided to follow up.
Field approach:
Don't use <>.date( <your date field name> + 12/24, 'M/D/YYYY hh:mm:ss[.fff]')
Variable approach:
date( date#('$(<your variable name>)') + 12/24, 'M/D/YYYY hh:mm:ss[.fff]')Don't use <>. Try
vDATA+MakeTime(12)
or if you need the formatted version:
Timestamp(vDATA+MakeTime(12))
-Rob
Tks a lot...
that´s work well!!!